From 4dc28e00570adc4de10acab768c291f68178a6b0 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 13 Aug 2022 10:29:10 +0200 Subject: [PATCH] setup hooks: substitutions.passthru -> passthru --- .../setup-hooks/make-binary-wrapper/default.nix | 6 ++++-- pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix b/pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix index 9f52a05f61c..c9b03b75cd0 100644 --- a/pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix +++ b/pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix @@ -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 diff --git a/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix b/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix index d7699b2557f..4aae1ce6876 100644 --- a/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix +++ b/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix @@ -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 { }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9466bd6d8b6..4a33563ac4f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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;