diff --git a/pkgs/development/tools/build-managers/gnumake/default.nix b/pkgs/by-name/gn/gnumake/package.nix similarity index 76% rename from pkgs/development/tools/build-managers/gnumake/default.nix rename to pkgs/by-name/gn/gnumake/package.nix index c6840241c609..79716bd7e852 100644 --- a/pkgs/development/tools/build-managers/gnumake/default.nix +++ b/pkgs/by-name/gn/gnumake/package.nix @@ -4,19 +4,19 @@ fetchurl, autoreconfHook, gettext, - guileSupport ? false, + gnumake, guile, - texinfo, + guileSupport ? false, # avoid guile depend on bootstrap to prevent dependency cycles inBootstrap ? false, pkg-config, - gnumake, + texinfo, + versionCheckHook, }: let guileEnabled = guileSupport && !inBootstrap; in - stdenv.mkDerivation (finalAttrs: { pname = "gnumake"; version = "4.4.1"; @@ -39,18 +39,16 @@ stdenv.mkDerivation (finalAttrs: { # directory until derivation realization to avoid unnecessary Nix evaluations. patches = lib.filesystem.listFilesRecursive ./patches; + strictDeps = true; + nativeBuildInputs = [ autoreconfHook pkg-config ] - ++ lib.optionals (!inBootstrap) [ texinfo ]; + ++ lib.optionals (!inBootstrap) [ texinfo ] + ++ lib.optional stdenv.isCygwin gettext; - buildInputs = - lib.optionals guileEnabled [ guile ] - # gettext gets pulled in via autoreconfHook because strictDeps is not set, - # and is linked against. Without this, it doesn't end up in HOST_PATH. - # TODO: enable strictDeps, and either make this dependency explicit, or remove it - ++ lib.optional stdenv.isCygwin gettext; + buildInputs = lib.optionals guileEnabled [ guile ]; configureFlags = lib.optional guileEnabled "--with-guile" @@ -69,12 +67,16 @@ stdenv.mkDerivation (finalAttrs: { ''; postInstall = lib.optionalString (!inBootstrap) '' - mkdir -p $doc/share/doc/$pname-$version - cp ./make.html $doc/share/doc/$pname-$version/index.html + install -Dm644 make.html \ + --target-directory="$doc"/share/doc/"$pname"-"$version" ''; separateDebugInfo = true; + doCheck = true; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + passthru.tests = { # make sure that the override doesn't break bootstrapping gnumakeWithGuile = gnumake.override { guileSupport = true; }; @@ -84,18 +86,19 @@ stdenv.mkDerivation (finalAttrs: { description = "Tool to control the generation of non-source files from sources"; longDescription = '' Make is a tool which controls the generation of executables and - other non-source files of a program from the program's source files. + other non-source files of a program from the program's source + files. Make gets its knowledge of how to build your program from a file - called the makefile, which lists each of the non-source files and - how to compute it from other files. When you write a program, you - should write a makefile for it, so that it is possible to use Make - to build and install the program. + called the makefile, which lists each of the non-source files + and how to compute it from other files. When you write a + program, you should write a makefile for it, so that it is + possible to use Make to build and install the program. ''; homepage = "https://www.gnu.org/software/make/"; license = lib.licenses.gpl3Plus; - maintainers = [ lib.maintainers.mdaniels5757 ]; mainProgram = "make"; + maintainers = with lib.maintainers; [ mdaniels5757 ]; platforms = lib.platforms.all; }; }) diff --git a/pkgs/development/tools/build-managers/gnumake/patches/0001-No-impure-bin-sh.patch b/pkgs/by-name/gn/gnumake/patches/0001-No-impure-bin-sh.patch similarity index 100% rename from pkgs/development/tools/build-managers/gnumake/patches/0001-No-impure-bin-sh.patch rename to pkgs/by-name/gn/gnumake/patches/0001-No-impure-bin-sh.patch diff --git a/pkgs/development/tools/build-managers/gnumake/patches/0002-Remove-impure-dirs.patch b/pkgs/by-name/gn/gnumake/patches/0002-Remove-impure-dirs.patch similarity index 100% rename from pkgs/development/tools/build-managers/gnumake/patches/0002-Remove-impure-dirs.patch rename to pkgs/by-name/gn/gnumake/patches/0002-Remove-impure-dirs.patch diff --git a/pkgs/development/tools/build-managers/gnumake/patches/0003-Do-not-search-for-a-C-compiler-and-set-MAKE_CXX.patch b/pkgs/by-name/gn/gnumake/patches/0003-Do-not-search-for-a-C-compiler-and-set-MAKE_CXX.patch similarity index 100% rename from pkgs/development/tools/build-managers/gnumake/patches/0003-Do-not-search-for-a-C-compiler-and-set-MAKE_CXX.patch rename to pkgs/by-name/gn/gnumake/patches/0003-Do-not-search-for-a-C-compiler-and-set-MAKE_CXX.patch diff --git a/pkgs/development/tools/build-managers/gnumake/patches/0004-Fix-signatures-for-getenv-getopt.patch b/pkgs/by-name/gn/gnumake/patches/0004-Fix-signatures-for-getenv-getopt.patch similarity index 100% rename from pkgs/development/tools/build-managers/gnumake/patches/0004-Fix-signatures-for-getenv-getopt.patch rename to pkgs/by-name/gn/gnumake/patches/0004-Fix-signatures-for-getenv-getopt.patch diff --git a/pkgs/development/tools/build-managers/gnumake/patches/0005-Fix-signatures-for-getenv-getopt.patch b/pkgs/by-name/gn/gnumake/patches/0005-Fix-signatures-for-getenv-getopt.patch similarity index 100% rename from pkgs/development/tools/build-managers/gnumake/patches/0005-Fix-signatures-for-getenv-getopt.patch rename to pkgs/by-name/gn/gnumake/patches/0005-Fix-signatures-for-getenv-getopt.patch diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index e2c2131eb762..d8c9470e5dfa 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -648,10 +648,6 @@ in inherit (prevStage) expand-response-params; }; - # To allow users' overrides inhibit dependencies too heavy for - # bootstrap, like guile: https://github.com/NixOS/nixpkgs/issues/181188 - gnumake = super.gnumake.override { inBootstrap = true; }; - gcc = lib.makeOverridable (import ../../build-support/cc-wrapper) { nativeTools = false; nativeLibc = false; @@ -869,8 +865,6 @@ in libunistring ; }; - - gnumake = super.gnumake.override { inBootstrap = false; }; } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { # Need to get rid of these when cross-compiling. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 487bbbccff0f..7977b0887274 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5744,8 +5744,6 @@ with pkgs; m4 = gnum4; - gnumake = callPackage ../development/tools/build-managers/gnumake { }; - gradle-packages = callPackage ../development/tools/build-managers/gradle { }; gradle_7-unwrapped = gradle-packages.gradle_7;