about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/build-managers/gnumake/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/build-managers/gnumake/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/build-managers/gnumake/default.nix29
1 files changed, 23 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/tools/build-managers/gnumake/default.nix b/nixpkgs/pkgs/development/tools/build-managers/gnumake/default.nix
index 7c4b0ad4650e..774ea50f8623 100644
--- a/nixpkgs/pkgs/development/tools/build-managers/gnumake/default.nix
+++ b/nixpkgs/pkgs/development/tools/build-managers/gnumake/default.nix
@@ -1,12 +1,24 @@
-{ lib, stdenv, fetchurl, guileSupport ? false, pkg-config, guile }:
+{ lib
+, stdenv
+, fetchurl
+, guileSupport ? false, guile
+# avoid guile depend on bootstrap to prevent dependency cycles
+, inBootstrap ? false
+, pkg-config
+, gnumake
+}:
+
+let
+  guileEnabled = guileSupport && !inBootstrap;
+in
 
 stdenv.mkDerivation rec {
   pname = "gnumake";
-  version = "4.3";
+  version = "4.4.1";
 
   src = fetchurl {
     url = "mirror://gnu/make/make-${version}.tar.gz";
-    sha256 = "06cfqzpqsvdnsxbysl5p2fgdgxgl9y4p7scpnrfa8z2zgkjdspz0";
+    sha256 = "sha256-3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M=";
   };
 
   # to update apply these patches with `git am *.patch` to https://git.savannah.gnu.org/git/make.git
@@ -19,10 +31,10 @@ stdenv.mkDerivation rec {
     ./0002-remove-impure-dirs.patch
   ];
 
-  nativeBuildInputs = lib.optionals guileSupport [ pkg-config ];
-  buildInputs = lib.optionals guileSupport [ guile ];
+  nativeBuildInputs = lib.optionals guileEnabled [ pkg-config ];
+  buildInputs = lib.optionals guileEnabled [ guile ];
 
-  configureFlags = lib.optional guileSupport "--with-guile"
+  configureFlags = lib.optional guileEnabled "--with-guile"
 
     # Make uses this test to decide whether it should keep track of
     # subseconds. Apple made this possible with APFS and macOS 10.13.
@@ -36,6 +48,11 @@ stdenv.mkDerivation rec {
   outputs = [ "out" "man" "info" ];
   separateDebugInfo = true;
 
+  passthru.tests = {
+    # make sure that the override doesn't break bootstrapping
+    gnumakeWithGuile = gnumake.override { guileSupport = true; };
+  };
+
   meta = with lib; {
     description = "A tool to control the generation of non-source files from sources";
     longDescription = ''