Commit 48034046 authored by OPNA2608's avatar OPNA2608
Browse files

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.
parent 80180c33
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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 { };