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.
main
OPNA2608 2 years ago
parent 80180c339e
commit 48034046bf
  1. 10
      pkgs/build-support/trivial-builders.nix
  2. 1
      pkgs/top-level/all-packages.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

@ -154,6 +154,7 @@ with pkgs;
pythonInterpreter = "${python3.withPackages (ps: [ ps.pyelftools ])}/bin/python";
autoPatchelfScript = ../build-support/setup-hooks/auto-patchelf.py;
};
meta.platforms = lib.platforms.linux;
} ../build-support/setup-hooks/auto-patchelf.sh;
appflowy = callPackage ../applications/office/appflowy { };

Loading…
Cancel
Save