1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

WIP rat 2.0 package

This commit is contained in:
RGBCube 2024-02-24 09:47:07 +03:00
parent 39c92a88c4
commit 050c0bc884
No known key found for this signature in database

View file

@ -1,41 +1,35 @@
{
stdenv,
lib,
bash,
fetchurl,
gnused,
makeWrapper,
opusfile,
sharutils,
sox,
fetchFromGitHub,
unixtools,
}:
stdenv.mkDerivation rec {
pname = "rat";
version = "1.1";
pname = "rat";
version = "2.0.1";
src = fetchurl {
url = "https://github.com/Mcharlsto/rat/releases/download/${version}/rat";
sha256 = "sha256-93sspjvXFPocGFPeCF1AWoWYx5hI7vMltx9SQ7x25z4=";
src = fetchFromGitHub {
owner = "thinkingsand";
repo = pname;
sha256 = "sha256-OsEIOC6EZrAN2NnDvnyN0nBRLVIviSMX2+TPqlidxrI=";
rev = "4817f542b067255d2b6cd1d29137f393da6e4085";
};
buildInputs = [ gnused makeWrapper ];
buildInputs = [ unixtools.xxd ];
buildPhase = ''
runHook preBuild
phases = [ "installPhase" "postInstall" ];
make linux_audio
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -Dm755 ./bin/rat -t $out/bin/
cp $src $out/bin/rat
chmod +x $out/bin/rat
sed -i '1 s/^.*$/#\/usr\/bin\/env bash/' $out/bin/rat
'';
postInstall = ''
wrapProgram $out/bin/rat \
--prefix PATH : ${lib.makeBinPath [ sharutils opusfile sox bash ]}
runHook postInstall
'';
}