diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 59aa56e0cf55..8483c23a6a1d 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -24421,6 +24421,12 @@ name = "sportshead"; keys = [ { fingerprint = "A6B6 D031 782E BDF7 631A 8E7E A874 DB2C BFD3 CFD0"; } ]; }; + spreetin = { + email = "spreetin@protonmail.com"; + name = "David Falk"; + github = "spreetin"; + githubId = 7392173; + }; sprock = { email = "rmason@mun.ca"; github = "sprock"; diff --git a/pkgs/by-name/go/gophertube/package.nix b/pkgs/by-name/go/gophertube/package.nix new file mode 100644 index 000000000000..63d6932baf68 --- /dev/null +++ b/pkgs/by-name/go/gophertube/package.nix @@ -0,0 +1,57 @@ +{ + 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"; + }; +})