configuration.nix/extra-packages/scripts/youtube/default.nix

34 lines
570 B
Nix
Raw Normal View History

2024-05-18 10:24:28 +05:30
{ lib
, stdenvNoCC
, makeWrapper
2024-06-02 23:35:58 +05:30
, mpv
2024-05-18 10:24:28 +05:30
, kitty
, rofi-wayland
, ueberzugpp
, ytfzf
,
}:
stdenvNoCC.mkDerivation {
pname = "youtube";
version = "0.1";
src = ./.;
nativeBuildInputs = [ makeWrapper ];
2024-06-02 23:35:58 +05:30
buildInputs = [ kitty mpv rofi-wayland ueberzugpp ytfzf ];
2024-05-18 10:24:28 +05:30
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp youtube.sh $out/bin/youtube
chmod +x $out/bin/youtube
runHook postInstall
'';
postInstall = ''
2024-06-02 23:35:58 +05:30
wrapProgram $out/bin/youtube --prefix PATH : ${lib.makeBinPath [kitty mpv rofi-wayland ueberzugpp ytfzf]}
2024-05-18 10:24:28 +05:30
'';
}