Files
nixpkgs/pkgs/by-name/go/gophertube/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

58 lines
1.2 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
yt-dlp,
mpv,
fzf,
chafa,
makeBinaryWrapper,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "gophertube";
version = "2.8.0";
src = fetchFromGitHub {
owner = "KrishnaSSH";
repo = "GopherTube";
tag = "v${finalAttrs.version}";
hash = "sha256-0TStXYghfRR11ETJcK2lnkBtS2IUy/YgeFFn0wXpeOU=";
};
vendorHash = "sha256-WfVoCxzMk+h4AP1zgTNRXTpj8Ltu71YrsQ7OoU3Y4tg=";
ldflags = [
"-X gophertube/internal/app.version=${finalAttrs.version}"
];
nativeBuildInputs = [ makeBinaryWrapper ];
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgramArg = "-v";
propagatedUserEnvPkgs = [
yt-dlp
mpv
fzf
chafa
];
postInstall = ''
wrapProgram $out/bin/gophertube \
--suffix PATH : ${lib.makeBinPath finalAttrs.propagatedUserEnvPkgs}
'';
meta = {
description = "Terminal user interface for search and watching YouTube videos using mpv and chafa";
homepage = "https://github.com/KrishnaSSh/GopherTube";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
spreetin
yiyu
];
mainProgram = "gophertube";
};
})