diff --git a/pkgs/development/interpreters/lua-5/wrapper.nix b/pkgs/development/interpreters/lua-5/wrapper.nix index 816744e61cff..53ec2baeb5e5 100644 --- a/pkgs/development/interpreters/lua-5/wrapper.nix +++ b/pkgs/development/interpreters/lua-5/wrapper.nix @@ -11,7 +11,7 @@ let env = let paths = requiredLuaModules (extraLibs ++ [ lua ] ); - in buildEnv { + in (buildEnv { name = "${lua.name}-env"; inherit paths; @@ -20,12 +20,6 @@ let # we create wrapper for the binaries in the different packages postBuild = '' - - . "${makeWrapper}/nix-support/setup-hook" - - # get access to lua functions - . ${lua}/nix-support/setup-hook - if [ -L "$out/bin" ]; then unlink "$out/bin" fi @@ -68,5 +62,8 @@ let ''; }; }; - }; + }).overrideAttrs (_: { + # Add extra deps needed for postBuild hook. + nativeBuildInputs = [ makeWrapper lua ]; + }); in env