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:
parent
39c92a88c4
commit
050c0bc884
1 changed files with 20 additions and 26 deletions
|
@ -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
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue