···11{ stdenv, fetchurl
22-, gnugrep, coreutils, getopt
22+, getopt
33}:
4455stdenv.mkDerivation rec {
66 name = "bmake-${version}";
77- version = "20121212";
77+ version = "20181221";
8899 src = fetchurl {
1010- # really wish this URL was versioned. if this changes for some
1111- # update in the future, we'll have to backport those updates to
1212- # any stable branches so builds can continue to work. :(
1313- url = "http://www.crufty.net/ftp/pub/sjg/bmake.tar.gz";
1010+ url = "http://www.crufty.net/ftp/pub/sjg/${name}.tar.gz";
1411 sha256 = "0zp6yy27z52qb12bgm3hy1dwal2i570615pqqk71zwhcxfs4h2gw";
1512 };
16131717- nativeBuildInputs =
1818- [ gnugrep coreutils getopt
1919- ];
1414+ nativeBuildInputs = [ getopt ];
20152121- # unexport-env sets PATH to a bogus value that won't be
2222- # possible to use inside the build sandbox. nuke that test;
2323- # we could also re-construct the PATH variable a bit based on
2424- # nativeBuildInputs, but not for now
2525- patchPhase = ''
2626- substituteInPlace ./unit-tests/Makefile.in \
2727- --replace "unexport-env" ""
2828- '';
1616+ patches = [
1717+ ./bootstrap-fix.patch
1818+ ./fix-unexport-env-test.patch
1919+ ];
29203021 meta = with stdenv.lib; {
3122 description = "Portable version of NetBSD 'make'";
···11+--- bmake/unit-tests/unexport-env.mk.orig 2019-02-19 10:24:14.356713136 -0800
22++++ bmake/unit-tests/unexport-env.mk 2019-02-19 10:25:43.838775388 -0800
33+@@ -3,8 +3,8 @@
44+ # pick up a bunch of exported vars
55+ .include "export.mk"
66+77+-# an example of setting up a minimal environment.
88+-PATH = /bin:/usr/bin:/sbin:/usr/sbin
99++# preserve PATH so commands used in the "all" target are still available
1010++PATH := ${PATH}
1111+1212+ # now clobber the environment to just PATH and UT_TEST
1313+ UT_TEST = unexport-env