diff options
author | OPNA2608 <christoph.neidahl@gmail.com> | 2022-03-22 19:20:58 +0100 |
---|---|---|
committer | OPNA2608 <christoph.neidahl@gmail.com> | 2022-03-22 19:55:46 +0100 |
commit | 48034046bf6271d44f7dea4c1ba97196b3b105a7 (patch) | |
tree | 9532130153229d20ee15f681aef5f7dc6e508497 /pkgs/build-support/trivial-builders.nix | |
parent | 80180c339e5e8c7e4b9e440df777ae2fb76b1811 (diff) |
autoPatchelfHook: Make Linux-exclusive
After being rewritten in https://github.com/NixOS/nixpkgs/pull/149731, this hook can fail on Mach-O binaries. Since patching ELF files on Darwin doesn't make much sense anyway, we'll mark this as Linux-exclusive.
Diffstat (limited to 'pkgs/build-support/trivial-builders.nix')
-rw-r--r-- | pkgs/build-support/trivial-builders.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 68f0f1bc4ddcb..b1237180ed39a 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -516,15 +516,19 @@ rec { * # setup hook that depends on the hello package and runs ./myscript.sh * myhellohook = makeSetupHook { deps = [ hello ]; } ./myscript.sh; * - * # wrotes a setup hook where @bash@ myscript.sh is substituted for the + * # writes a Linux-exclusive setup hook where @bash@ myscript.sh is substituted for the * # bash interpreter. * myhellohookSub = makeSetupHook { * deps = [ hello ]; * substitutions = { bash = "${pkgs.bash}/bin/bash"; }; + * meta.platforms = lib.platforms.linux; * } ./myscript.sh; */ - makeSetupHook = { name ? "hook", deps ? [], substitutions ? {} }: script: - runCommand name substitutions + makeSetupHook = { name ? "hook", deps ? [], substitutions ? {}, meta ? {} }: script: + runCommand name + (substitutions // { + inherit meta; + }) ('' mkdir -p $out/nix-support cp ${script} $out/nix-support/setup-hook |