···1{ stdenv, fetchurl
2-, gnugrep, coreutils, getopt
3}:
45stdenv.mkDerivation rec {
6 name = "bmake-${version}";
7- version = "20121212";
89 src = fetchurl {
10- # really wish this URL was versioned. if this changes for some
11- # update in the future, we'll have to backport those updates to
12- # any stable branches so builds can continue to work. :(
13- url = "http://www.crufty.net/ftp/pub/sjg/bmake.tar.gz";
14 sha256 = "0zp6yy27z52qb12bgm3hy1dwal2i570615pqqk71zwhcxfs4h2gw";
15 };
1617- nativeBuildInputs =
18- [ gnugrep coreutils getopt
19- ];
2021- # unexport-env sets PATH to a bogus value that won't be
22- # possible to use inside the build sandbox. nuke that test;
23- # we could also re-construct the PATH variable a bit based on
24- # nativeBuildInputs, but not for now
25- patchPhase = ''
26- substituteInPlace ./unit-tests/Makefile.in \
27- --replace "unexport-env" ""
28- '';
2930 meta = with stdenv.lib; {
31 description = "Portable version of NetBSD 'make'";
···1+--- bmake/unit-tests/unexport-env.mk.orig 2019-02-19 10:24:14.356713136 -0800
2++++ bmake/unit-tests/unexport-env.mk 2019-02-19 10:25:43.838775388 -0800
3+@@ -3,8 +3,8 @@
4+ # pick up a bunch of exported vars
5+ .include "export.mk"
6+7+-# an example of setting up a minimal environment.
8+-PATH = /bin:/usr/bin:/sbin:/usr/sbin
9++# preserve PATH so commands used in the "all" target are still available
10++PATH := ${PATH}
11+12+ # now clobber the environment to just PATH and UT_TEST
13+ UT_TEST = unexport-env