setup hooks: substitutions.passthru -> passthru

This commit is contained in:
Robert Hensing 2022-08-13 10:29:10 +02:00
parent ba895a7da8
commit 4dc28e0057
3 changed files with 9 additions and 5 deletions

View file

@ -16,12 +16,14 @@ makeSetupHook {
substitutions = {
cc = "${cc}/bin/${cc.targetPrefix}cc ${lib.escapeShellArgs (map (s: "-fsanitize=${s}") sanitizers)}";
};
passthru = {
# Extract the function call used to create a binary wrapper from its embedded docstring
passthru.extractCmd = writeShellScript "extract-binary-wrapper-cmd" ''
extractCmd = writeShellScript "extract-binary-wrapper-cmd" ''
strings -dw "$1" | sed -n '/^makeCWrapper/,/^$/ p'
'';
passthru.tests = tests.makeBinaryWrapper;
tests = tests.makeBinaryWrapper;
};
} ./make-binary-wrapper.sh

View file

@ -36,8 +36,8 @@ makeSetupHook {
# We use the wrapProgram function.
makeWrapper
];
substitutions = {
passthru.tests = let
passthru = {
tests = let
sample-project = ./tests/sample-project;
testLib = callPackage ./tests/lib.nix { };

View file

@ -863,7 +863,9 @@ with pkgs;
{ deps = [ dieHook ];
substitutions = {
shell = targetPackages.runtimeShell;
passthru.tests = tests.makeWrapper;
};
passthru = {
tests = tests.makeWrapper;
};
}
../build-support/setup-hooks/make-wrapper.sh;