diff options
Diffstat (limited to 'pkgs/os-specific/bsd/netbsd/pkgs/makeMinimal.nix')
-rw-r--r-- | pkgs/os-specific/bsd/netbsd/pkgs/makeMinimal.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/makeMinimal.nix b/pkgs/os-specific/bsd/netbsd/pkgs/makeMinimal.nix new file mode 100644 index 0000000000000..18655b3bf863e --- /dev/null +++ b/pkgs/os-specific/bsd/netbsd/pkgs/makeMinimal.nix @@ -0,0 +1,43 @@ +{ mkDerivation +, bsdSetupHook, netbsdSetupHook, rsync +, make +}: + +mkDerivation { + path = "tools/make"; + sha256 = "0fh0nrnk18m613m5blrliq2aydciv51qhc0ihsj4k63incwbk90n"; + version = "9.2"; + + buildInputs = []; + nativeBuildInputs = [ + bsdSetupHook netbsdSetupHook rsync + ]; + + skipIncludesPhase = true; + + postPatch = '' + patchShebangs $COMPONENT_PATH/configure + ${make.postPatch} + ''; + + buildPhase = '' + runHook preBuild + + sh ./buildmake.sh + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + install -D nbmake $out/bin/nbmake + ln -s $out/bin/nbmake $out/bin/make + mkdir -p $out/share + cp -r $BSDSRCDIR/share/mk $out/share/mk + + runHook postInstall + ''; + + extraPaths = [ make.src ] ++ make.extraPaths; +} |