From 238b793373ab07e40a70cc0834c30c28859a8720 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Thu, 15 Jun 2023 18:04:46 -0700 Subject: [PATCH 1/2] glibc: allow users of glibc/common.nix to override makeFlags This commit allows to include `makeFlags` in a glibc derivation without clobbering the flags from `common.nix` --- pkgs/development/libraries/glibc/common.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index de9867f41d0de..f98c0eb1c3487 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -161,7 +161,7 @@ stdenv.mkDerivation ({ ++ lib.optional withGd "--with-gd" ++ lib.optional (!withLibcrypt) "--disable-crypt"; - makeFlags = [ + makeFlags = (args.makeFlags or []) ++ [ "OBJCOPY=${stdenv.cc.targetPrefix}objcopy" ]; @@ -196,7 +196,7 @@ stdenv.mkDerivation ({ passthru = { inherit version; minorRelease = version; }; } -// (removeAttrs args [ "withLinuxHeaders" "withGd" "postInstall" ]) // +// (removeAttrs args [ "withLinuxHeaders" "withGd" "postInstall" "makeFlags" ]) // { src = fetchurl { From 7306386eb35c9fbeb288d91b855e1267606ece27 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Thu, 15 Jun 2023 19:40:06 -0700 Subject: [PATCH 2/2] glibcInfo: use makeFlags instead of buildPhase This commit causes glibc/info.nix to use the standard builder's `buildPhase` so things like `preBuild`, `postBuild`, `enableParallelBuilding`, etc work correctly. --- pkgs/development/libraries/glibc/info.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/glibc/info.nix b/pkgs/development/libraries/glibc/info.nix index 04b0dc00a894e..d643d8a6ba09f 100644 --- a/pkgs/development/libraries/glibc/info.nix +++ b/pkgs/development/libraries/glibc/info.nix @@ -9,7 +9,7 @@ callPackage ./common.nix {} { extraNativeBuildInputs = [ texinfo perl ]; - buildPhase = "make info"; + makeFlags = [ "info" ]; # I don't know why the info is not generated in 'build' # Somehow building the info still does not work, because the final