Revert "use wrapper to set LUA_PATH variable"
This reverts commit 807cd4b4d4, as it
broke the 'awesome' package. It was also an incomplete change, only
modifying lua-5.1 and none of the other lua versions.
A better approach, if wanting lua to pick up external modules, would be
to loop over $NIX_PROFILES. $NIX_PROFILES is unset in build
environments, so it should be safe.
Conflicts:
pkgs/development/interpreters/lua-5/5.1.nix
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, readline, makeWrapper }:
|
{ stdenv, fetchurl, readline }:
|
||||||
|
|
||||||
let
|
let
|
||||||
dsoPatch = fetchurl {
|
dsoPatch = fetchurl {
|
||||||
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333";
|
sha256 = "2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ readline makeWrapper ];
|
buildInputs = [ readline ];
|
||||||
|
|
||||||
patches = if stdenv.isDarwin then [ ./5.1.darwin.patch ] else [ dsoPatch ];
|
patches = if stdenv.isDarwin then [ ./5.1.darwin.patch ] else [ dsoPatch ];
|
||||||
|
|
||||||
@@ -35,9 +35,6 @@ stdenv.mkDerivation rec {
|
|||||||
sed <"etc/lua.pc" >"$out/lib/pkgconfig/lua.pc" -e "s|^prefix=.*|prefix=$out|"
|
sed <"etc/lua.pc" >"$out/lib/pkgconfig/lua.pc" -e "s|^prefix=.*|prefix=$out|"
|
||||||
mv "doc/"*.{gif,png,css,html} "$out/share/doc/lua/"
|
mv "doc/"*.{gif,png,css,html} "$out/share/doc/lua/"
|
||||||
rmdir $out/{share,lib}/lua/5.1 $out/{share,lib}/lua
|
rmdir $out/{share,lib}/lua/5.1 $out/{share,lib}/lua
|
||||||
wrapProgram $out/bin/lua \
|
|
||||||
--set LUA_PATH '"$HOME/.nix-profile/lib/lua/5.1/?.lua;$HOME/.nix-profile/share/lua/5.1/?.lua"' \
|
|
||||||
--set LUA_CPATH '"$HOME/.nix-profile/lib/lua/5.1/?.so;$HOME/.nix-profile/share/lua/5.1/?.so"'
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|||||||
Reference in New Issue
Block a user