nix-samples/hello-world-callpackage/build.nix

20 lines
332 B
Nix
Raw Permalink Normal View History

2024-03-17 17:33:12 +01:00
{
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
'';
}