2024-04-16 00:51:25 -04:00
|
|
|
{ buildGoModule
|
|
|
|
, installShellFiles
|
|
|
|
, lib
|
|
|
|
, rev
|
|
|
|
, version
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ytdl-web";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = ./..;
|
|
|
|
|
|
|
|
vendorHash = "sha256-Rqh5tGcSey53e0Ln3u5agvOwRJ6/I1eUpzRylwtjhQo=";
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X $VERSION_PKG.Version=${version}"
|
|
|
|
"-X $VERSION_PKG.Build=${rev}"
|
|
|
|
"-X $VERSION_PKG.BuildDate=1970-01-01T0:00:00+0000"
|
|
|
|
"-X $VERSION_PKG.BuiltBy=nix"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd ${pname} \
|
|
|
|
--zsh <($out/bin/${pname} completion zsh) \
|
|
|
|
--bash <($out/bin/${pname} completion bash) \
|
|
|
|
--fish <($out/bin/${pname} completion fish)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Yet another yt-dlp web frontend written in Go.";
|
|
|
|
homepage = "https://git.fifitido.net/apps/ytdl-web";
|
|
|
|
license = licenses.gpl3Only;
|
2024-04-16 09:59:09 -04:00
|
|
|
mainProgram = "ytdl-web";
|
2024-04-16 00:51:25 -04:00
|
|
|
};
|
|
|
|
}
|