From 6687a981a168c19230b083fbb03e7ff9747350f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 17 Aug 2024 23:06:55 +0200 Subject: [PATCH] nixStatic: use git and man in installCheckInputs This fixes the nix 2.24 build. Update pkgs/tools/package-management/nix/common.nix Co-authored-by: tobim --- pkgs/tools/package-management/nix/common.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index 50874fef5c6c..27ea4a075bdc 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -73,8 +73,7 @@ in , sqlite , util-linuxMinimal , xz - -, enableDocumentation ? !atLeast24 || stdenv.hostPlatform == stdenv.buildPlatform +, enableDocumentation ? stdenv.buildPlatform.canExecute stdenv.hostPlatform , enableStatic ? stdenv.hostPlatform.isStatic , withAWS ? !enableStatic && (stdenv.isLinux || stdenv.isDarwin), aws-sdk-cpp , withLibseccomp ? lib.meta.availableOn stdenv.hostPlatform libseccomp, libseccomp @@ -105,6 +104,8 @@ self = stdenv.mkDerivation { "shadowstack" ] ++ lib.optional stdenv.hostPlatform.isMusl "fortify"; + nativeInstallCheckInputs = lib.optional atLeast221 git ++ lib.optional atLeast219 man; + nativeBuildInputs = [ pkg-config autoconf-archive @@ -155,11 +156,6 @@ self = stdenv.mkDerivation { aws-sdk-cpp ]; - installCheckInputs = lib.optionals atLeast221 [ - git - ] ++ lib.optionals atLeast219 [ - man - ]; propagatedBuildInputs = [ boehmgc @@ -246,6 +242,9 @@ self = stdenv.mkDerivation { # See https://github.com/NixOS/nix/issues/5687 + lib.optionalString (atLeast25 && stdenv.isDarwin) '' echo "exit 99" > tests/gc-non-blocking.sh + '' + '' + # nixStatic otherwise does not find its man pages in tests. + export MANPATH=$man/share/man:$MANPATH ''; separateDebugInfo = stdenv.isLinux && (atLeast24 -> !enableStatic);