From 02bf42126fc6c98f8257c9718531c110555a9ebf Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Tue, 10 May 2022 18:35:42 -0400 Subject: [PATCH] Fix sile wrapper issues on darwin. Darwin execve has issues with shebang lines that point to other scripts with shebang lines. A new makeBinaryWrapper hook was added to workaround the issue on darwin. See #171473 and #23018 for more information. This uses that binary wrapper to fix packages like sile. I'm not sure this can be considered complete but it appears to work for sile at least. --- pkgs/development/interpreters/lua-5/interpreter.nix | 4 ++-- pkgs/development/interpreters/lua-5/wrapper.nix | 4 ++-- pkgs/tools/typesetting/sile/default.nix | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/development/interpreters/lua-5/interpreter.nix b/pkgs/development/interpreters/lua-5/interpreter.nix index de61714f2421d..e2d4133c15f4f 100644 --- a/pkgs/development/interpreters/lua-5/interpreter.nix +++ b/pkgs/development/interpreters/lua-5/interpreter.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, readline , compat ? false , callPackage -, makeWrapper +, makeBinaryWrapper , packageOverrides ? (final: prev: {}) , sourceVersion , hash @@ -40,7 +40,7 @@ self = stdenv.mkDerivation rec { LuaCPathSearchPaths = luaPackages.lib.luaCPathList; setupHook = luaPackages.lua-setup-hook LuaPathSearchPaths LuaCPathSearchPaths; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeBinaryWrapper ]; buildInputs = [ readline ]; inherit patches; diff --git a/pkgs/development/interpreters/lua-5/wrapper.nix b/pkgs/development/interpreters/lua-5/wrapper.nix index b9ac255d24329..391346ac7215c 100644 --- a/pkgs/development/interpreters/lua-5/wrapper.nix +++ b/pkgs/development/interpreters/lua-5/wrapper.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, lua, buildEnv, makeWrapper +{ lib, stdenv, lua, buildEnv, makeBinaryWrapper , extraLibs ? [] , extraOutputsToInstall ? [] , postBuild ? "" @@ -19,7 +19,7 @@ let extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall; nativeBuildInputs = [ - makeWrapper + makeBinaryWrapper (lua.pkgs.lua-setup-hook lua.LuaPathSearchPaths lua.LuaCPathSearchPaths) ]; diff --git a/pkgs/tools/typesetting/sile/default.nix b/pkgs/tools/typesetting/sile/default.nix index 4bff8ab3ae301..7997d1126172f 100644 --- a/pkgs/tools/typesetting/sile/default.nix +++ b/pkgs/tools/typesetting/sile/default.nix @@ -111,7 +111,6 @@ stdenv.mkDerivation rec { homepage = "https://sile-typesetter.org"; changelog = "https://github.com/sile-typesetter/sile/raw/v${version}/CHANGELOG.md"; platforms = platforms.unix; - broken = stdenv.isDarwin; # https://github.com/NixOS/nixpkgs/issues/23018 maintainers = with maintainers; [ doronbehar alerque ]; license = licenses.mit; };