bmake: fix version/url, fix tests, remove unneeded deps

As noted by @jameysharp in #63181.

Signed-off-by: Austin Seipp <as@fastly.com>

+31 -17
+10
pkgs/development/tools/build-managers/bmake/bootstrap-fix.patch
··· 1 + --- bmake/make-bootstrap.sh.in.orig 2019-02-19 10:55:21.733606117 -0800 2 + +++ bmake/make-bootstrap.sh.in 2019-02-19 10:56:02.150771541 -0800 3 + @@ -4,6 +4,7 @@ 4 + 5 + srcdir=@srcdir@ 6 + 7 + +prefix="@prefix@" 8 + DEFAULT_SYS_PATH="@default_sys_path@" 9 + 10 + case "@use_meta@" in
+8 -17
pkgs/development/tools/build-managers/bmake/default.nix
··· 1 1 { stdenv, fetchurl 2 - , gnugrep, coreutils, getopt 2 + , getopt 3 3 }: 4 4 5 5 stdenv.mkDerivation rec { 6 6 name = "bmake-${version}"; 7 - version = "20121212"; 7 + version = "20181221"; 8 8 9 9 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"; 10 + url = "http://www.crufty.net/ftp/pub/sjg/${name}.tar.gz"; 14 11 sha256 = "0zp6yy27z52qb12bgm3hy1dwal2i570615pqqk71zwhcxfs4h2gw"; 15 12 }; 16 13 17 - nativeBuildInputs = 18 - [ gnugrep coreutils getopt 19 - ]; 14 + nativeBuildInputs = [ getopt ]; 20 15 21 - # 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 - ''; 16 + patches = [ 17 + ./bootstrap-fix.patch 18 + ./fix-unexport-env-test.patch 19 + ]; 29 20 30 21 meta = with stdenv.lib; { 31 22 description = "Portable version of NetBSD 'make'";
+13
pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch
··· 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