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:
parent
d5435990b0
commit
ebf46e5764
|
@ -1,7 +1,7 @@
|
||||||
{ lib, coreutils, python3, gcc, writeText, writeScript, runCommand, makeBinaryWrapper }:
|
{ lib, coreutils, python3, gcc, writeText, writeScript, runCommand, makeBinaryWrapper }:
|
||||||
|
|
||||||
let
|
let
|
||||||
env = { nativeBuildInputs = [ makeBinaryWrapper ]; };
|
env = { buildInputs = [ makeBinaryWrapper ]; };
|
||||||
envCheck = runCommand "envcheck" env ''
|
envCheck = runCommand "envcheck" env ''
|
||||||
${gcc}/bin/cc -Wall -Werror -Wpedantic -o $out ${./envcheck.c}
|
${gcc}/bin/cc -Wall -Werror -Wpedantic -o $out ${./envcheck.c}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -697,8 +697,15 @@ with pkgs;
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
makeSetupHook {
|
makeSetupHook {
|
||||||
deps = [ dieHook ];
|
deps = [ dieHook cc ];
|
||||||
substitutions.passthru.tests = callPackage ../test/make-binary-wrapper { inherit makeBinaryWrapper; };
|
substitutions.passthru.tests = callPackage ../test/make-binary-wrapper {
|
||||||
|
makeBinaryWrapper = makeBinaryWrapper.override {
|
||||||
|
sanitizers = (if stdenv.isDarwin && stdenv.isAarch64
|
||||||
|
then [ ]
|
||||||
|
else [ "undefined" "address" ]
|
||||||
|
);
|
||||||
|
};
|
||||||
|
};
|
||||||
} script;
|
} script;
|
||||||
in
|
in
|
||||||
lib.makeOverridable f {
|
lib.makeOverridable f {
|
||||||
|
|
Loading…
Reference in a new issue