summary refs log tree commit diff
diff options
context:
space:
mode:
authorAustin Seipp <as@fastly.com>2019-06-16 14:24:15 -0500
committerAustin Seipp <as@fastly.com>2019-06-16 14:26:49 -0500
commitccee4117be08f0474640e06f76a7881389fb7b47 (patch)
tree0ef9c84710146ac48c89a9980e3a405ff694dfa8
parent486626bd70a6aa0542f27996b009281f1d6929dc (diff)
downloadnixpkgs-ccee4117be08f0474640e06f76a7881389fb7b47.tar
nixpkgs-ccee4117be08f0474640e06f76a7881389fb7b47.tar.gz
nixpkgs-ccee4117be08f0474640e06f76a7881389fb7b47.tar.bz2
nixpkgs-ccee4117be08f0474640e06f76a7881389fb7b47.tar.lz
nixpkgs-ccee4117be08f0474640e06f76a7881389fb7b47.tar.xz
nixpkgs-ccee4117be08f0474640e06f76a7881389fb7b47.tar.zst
nixpkgs-ccee4117be08f0474640e06f76a7881389fb7b47.zip
bmake: fix version/url, fix tests, remove unneeded deps
As noted by @jameysharp in #63181.

Signed-off-by: Austin Seipp <as@fastly.com>
-rw-r--r--pkgs/development/tools/build-managers/bmake/bootstrap-fix.patch10
-rw-r--r--pkgs/development/tools/build-managers/bmake/default.nix25
-rw-r--r--pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch13
3 files changed, 31 insertions, 17 deletions
diff --git a/pkgs/development/tools/build-managers/bmake/bootstrap-fix.patch b/pkgs/development/tools/build-managers/bmake/bootstrap-fix.patch
new file mode 100644
index 00000000000..9b1267257ad
--- /dev/null
+++ b/pkgs/development/tools/build-managers/bmake/bootstrap-fix.patch
@@ -0,0 +1,10 @@
+--- bmake/make-bootstrap.sh.in.orig     2019-02-19 10:55:21.733606117 -0800
++++ bmake/make-bootstrap.sh.in  2019-02-19 10:56:02.150771541 -0800
+@@ -4,6 +4,7 @@
+ 
+ srcdir=@srcdir@
+ 
++prefix="@prefix@"
+ DEFAULT_SYS_PATH="@default_sys_path@"
+ 
+ case "@use_meta@" in
diff --git a/pkgs/development/tools/build-managers/bmake/default.nix b/pkgs/development/tools/build-managers/bmake/default.nix
index e101eea0cd3..f71b877c8c5 100644
--- a/pkgs/development/tools/build-managers/bmake/default.nix
+++ b/pkgs/development/tools/build-managers/bmake/default.nix
@@ -1,31 +1,22 @@
 { stdenv, fetchurl
-, gnugrep, coreutils, getopt
+, getopt
 }:
 
 stdenv.mkDerivation rec {
   name    = "bmake-${version}";
-  version = "20121212";
+  version = "20181221";
 
   src = fetchurl {
-    # really wish this URL was versioned. if this changes for some
-    # update in the future, we'll have to backport those updates to
-    # any stable branches so builds can continue to work. :(
-    url    = "http://www.crufty.net/ftp/pub/sjg/bmake.tar.gz";
+    url    = "http://www.crufty.net/ftp/pub/sjg/${name}.tar.gz";
     sha256 = "0zp6yy27z52qb12bgm3hy1dwal2i570615pqqk71zwhcxfs4h2gw";
   };
 
-  nativeBuildInputs =
-    [ gnugrep coreutils getopt
-    ];
+  nativeBuildInputs = [ getopt ];
 
-  # unexport-env sets PATH to a bogus value that won't be
-  # possible to use inside the build sandbox. nuke that test;
-  # we could also re-construct the PATH variable a bit based on
-  # nativeBuildInputs, but not for now
-  patchPhase = ''
-    substituteInPlace ./unit-tests/Makefile.in \
-      --replace "unexport-env" ""
-  '';
+  patches = [
+    ./bootstrap-fix.patch
+    ./fix-unexport-env-test.patch
+  ];
 
   meta = with stdenv.lib; {
     description = "Portable version of NetBSD 'make'";
diff --git a/pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch b/pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch
new file mode 100644
index 00000000000..339348f37c3
--- /dev/null
+++ b/pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch
@@ -0,0 +1,13 @@
+--- bmake/unit-tests/unexport-env.mk.orig       2019-02-19 10:24:14.356713136 -0800
++++ bmake/unit-tests/unexport-env.mk    2019-02-19 10:25:43.838775388 -0800
+@@ -3,8 +3,8 @@
+ # pick up a bunch of exported vars
+ .include "export.mk"
+ 
+-# an example of setting up a minimal environment.
+-PATH = /bin:/usr/bin:/sbin:/usr/sbin
++# preserve PATH so commands used in the "all" target are still available
++PATH := ${PATH}
+ 
+ # now clobber the environment to just PATH and UT_TEST
+ UT_TEST = unexport-env