nixpkgs/pkgs/by-name/in/invidtui/package.nix
2024-03-08 12:23:42 +00:00

32 lines
908 B
Nix

{ lib, buildGoModule, fetchFromGitHub, yt-dlp, ffmpeg, mpv }:
buildGoModule rec {
pname = "invidtui";
version = "0.4.4";
src = fetchFromGitHub {
owner = "darkhz";
repo = "invidtui";
rev = "refs/tags/v${version}";
hash = "sha256-nNJ2bjrHRIzcPs+jbZpgaHBxSWRzSRIsT6xx9EsbISg=";
};
vendorHash = "sha256-C7O2GJuEdO8geRPfHx1Sq6ZveDE/u65JBx/Egh3cnK4=";
doCheck = true;
postPatch = ''
substituteInPlace cmd/flags.go \
--replace "\"ffmpeg\"" "\"${lib.getBin ffmpeg}/bin/ffmpeg\"" \
--replace "\"mpv\"" "\"${lib.getBin mpv}/bin/mpv\"" \
--replace "\"yt-dlp\"" "\"${lib.getBin yt-dlp}/bin/yt-dlp\""
'';
meta = with lib; {
homepage = "https://darkhz.github.io/invidtui/";
description = "An invidious TUI client";
license = licenses.mit;
maintainers = with maintainers; [ rettetdemdativ ];
mainProgram = "invidtui";
};
}