nix-samples/hello-world-callpackage/build.nix
2024-03-17 17:33:12 +01:00

20 lines
332 B
Nix

{
lib,
stdenv,
fetchzip,
version,
hash,
}:
stdenv.mkDerivation {
pname = "hello";
version = "${version}";
src = fetchzip {
url = "https://ftp.gnu.org/gnu/hello/hello-${version}.tar.gz";
hash = "${hash}";
};
installPhase = ''
./hello --version
mkdir -p $out/bin
cp hello $out/bin/hello
'';
}