From 1b0513941425af8967e637032bd88dc933892e0a Mon Sep 17 00:00:00 2001 From: Sergey Mironov Date: Wed, 16 Mar 2016 23:52:09 +0300 Subject: [PATCH] torch: Read LUA_PATH and LUA_CPATH set by users --- .../science/machine-learning/torch/torch-distro.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/machine-learning/torch/torch-distro.nix b/pkgs/applications/science/machine-learning/torch/torch-distro.nix index cbbaf0383c72..2204af0597e4 100644 --- a/pkgs/applications/science/machine-learning/torch/torch-distro.nix +++ b/pkgs/applications/science/machine-learning/torch/torch-distro.nix @@ -117,8 +117,10 @@ let wrapProgram $p \ --set LD_LIBRARY_PATH "${lib.makeSearchPath "lib" runtimeDeps_}" \ --set PATH "${lib.makeSearchPath "bin" runtimeDeps_}" \ - --set LUA_PATH "'$LUA_PATH;$out/share/lua/${luajit.luaversion}/?.lua;$out/share/lua/${luajit.luaversion}/?/init.lua'" \ - --set LUA_CPATH "'$LUA_CPATH;$out/lib/lua/${luajit.luaversion}/?.so;$out/lib/lua/${luajit.luaversion}/?/init.so'" + --suffix LUA_PATH ';' "\"$LUA_PATH\"" \ + --suffix LUA_PATH ';' "\"$out/share/lua/${luajit.luaversion}/?.lua;$out/share/lua/${luajit.luaversion}/?/init.lua\"" \ + --suffix LUA_CPATH ';' "\"$LUA_CPATH\"" \ + --suffix LUA_CPATH ';' "\"$out/lib/lua/${luajit.luaversion}/?.so;$out/lib/lua/${luajit.luaversion}/?/init.so\"" done eval "$postInstall"