21 lines
488 B
Nix
21 lines
488 B
Nix
{pkgs, patchElf ? false, name, url, sha256 ? "0000000000000000000000000000000000000000000000000000"}:
|
|
with pkgs;
|
|
stdenv.mkDerivation {
|
|
inherit name;
|
|
src = fetchurl {
|
|
url = url;
|
|
sha256 = sha256;
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
] ++ lib.optionals patchElf [
|
|
autoPatchelfHook
|
|
];
|
|
|
|
phases = ["installPhase" "fixupPhase"];
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp $src $out/bin/${name}
|
|
chmod u+x $out/bin/${name}
|
|
'';
|
|
} |