Unverified Commit 77d5a40d authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

gophertube: init at 2.8.0 (#433755)

parents 90807be0 d8065285
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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";
+57 −0
Original line number Diff line number Diff line
{
  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";
  };
})