makeBinaryWrapper: Fix issues on aarch64-darwin/macOS 12 (Monterey)

Sanitizers don't seem to be present on aarch64-darwin/macOS 12 (Monterey), so they are removed from the aarch64-darwin tests.

Switching from nativeBuildInputs to buildInputs and adding cc to the deps list caused some strange error messages to go away.
This commit is contained in:
Tobias Bergkvist 2021-12-16 21:29:21 +01:00
parent d5435990b0
commit ebf46e5764
2 changed files with 10 additions and 3 deletions

View file

@ -1,7 +1,7 @@
{ lib, coreutils, python3, gcc, writeText, writeScript, runCommand, makeBinaryWrapper }:
let
env = { nativeBuildInputs = [ makeBinaryWrapper ]; };
env = { buildInputs = [ makeBinaryWrapper ]; };
envCheck = runCommand "envcheck" env ''
${gcc}/bin/cc -Wall -Werror -Wpedantic -o $out ${./envcheck.c}
'';

View file

@ -697,8 +697,15 @@ with pkgs;
'';
in
makeSetupHook {
deps = [ dieHook ];
substitutions.passthru.tests = callPackage ../test/make-binary-wrapper { inherit makeBinaryWrapper; };
deps = [ dieHook cc ];
substitutions.passthru.tests = callPackage ../test/make-binary-wrapper {
makeBinaryWrapper = makeBinaryWrapper.override {
sanitizers = (if stdenv.isDarwin && stdenv.isAarch64
then [ ]
else [ "undefined" "address" ]
);
};
};
} script;
in
lib.makeOverridable f {