mirror of
https://github.com/NotAShelf/nyxexprs.git
synced 2024-11-02 03:21:15 +00:00
37 lines
688 B
Nix
37 lines
688 B
Nix
|
{
|
||
|
stdenv,
|
||
|
fetchurl,
|
||
|
gnused,
|
||
|
makeWrapper,
|
||
|
pkgs,
|
||
|
lib,
|
||
|
}:
|
||
|
stdenv.mkDerivation rec {
|
||
|
pname = "rat";
|
||
|
version = "1.1";
|
||
|
|
||
|
src = fetchurl {
|
||
|
url = "https://github.com/Mcharlsto/rat/releases/download/${version}/rat";
|
||
|
sha256 = "sha256-93sspjvXFPocGFPeCF1AWoWYx5hI7vMltx9SQ7x25z4=";
|
||
|
};
|
||
|
|
||
|
buildInputs = [gnused makeWrapper];
|
||
|
|
||
|
phases = ["installPhase" "postInstall"];
|
||
|
|
||
|
installPhase = ''
|
||
|
mkdir -p $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 (with pkgs; [sharutils opusfile sox bash])}
|
||
|
'';
|
||
|
}
|