pkgs/cliamp.nix (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
makeWrapper,
alsa-lib,
ffmpeg,
yt-dlp,
}:
stdenv.mkDerivation rec {
pname = "cliamp";
version = "1.39.0";
src = fetchurl {
url = "https://github.com/bjarneo/cliamp/releases/download/v${version}/cliamp-linux-amd64";
hash = "sha256-4FklR66sOkpVKi2xqm8Lpt8Y9PUTcu3vgzk55+Xc1XI=";
};
dontUnpack = true;
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
];
buildInputs = [ alsa-lib ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp $src $out/bin/cliamp
chmod +x $out/bin/cliamp
wrapProgram $out/bin/cliamp \
--prefix PATH : ${
lib.makeBinPath [
ffmpeg
yt-dlp
]
}
runHook postInstall
'';
meta = with lib; {
description = "terminal music player";
homepage = "https://github.com/bjarneo/cliamp";
changelog = "https://github.com/bjarneo/cliamp/releases/tag/v${version}";
license = licenses.mit;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
platforms = [ "x86_64-linux" ];
mainProgram = "cliamp";
};
}
|