diff --git a/pkgs/tools/typesetting/sile/default.nix b/pkgs/tools/typesetting/sile/default.nix index 71c2131e57d..966d657ae7d 100644 --- a/pkgs/tools/typesetting/sile/default.nix +++ b/pkgs/tools/typesetting/sile/default.nix @@ -1,5 +1,5 @@ { stdenv, darwin, fetchurl, makeWrapper, pkgconfig -, harfbuzz, icu, lpeg, luaexpat, lua-zlib, luafilesystem, luasocket, luasec +, harfbuzz, icu , fontconfig, lua, libiconv , makeFontsConf, gentium, gentium-book-basic, dejavu_fonts }: @@ -7,13 +7,7 @@ with stdenv.lib; let - - libs = [ lpeg luaexpat lua-zlib luafilesystem luasocket luasec ]; - getPath = lib : type : "${lib}/lib/lua/${lua.luaversion}/?.${type};${lib}/share/lua/${lua.luaversion}/?.${type}"; - getLuaPath = lib : getPath lib "lua"; - getLuaCPath = lib : getPath lib "so"; - luaPath = concatStringsSep ";" (map getLuaPath libs); - luaCPath = concatStringsSep ";" (map getLuaCPath libs); + luaEnv = lua.withPackages(ps: with ps;[ lpeg luaexpat lua-zlib luafilesystem luasocket luasec]); in @@ -27,8 +21,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [pkgconfig makeWrapper]; - buildInputs = [ harfbuzz icu lua fontconfig libiconv ] - ++ libs + buildInputs = [ harfbuzz icu fontconfig libiconv luaEnv ] ++ optional stdenv.isDarwin darwin.apple_sdk.frameworks.AppKit ; @@ -38,9 +31,6 @@ stdenv.mkDerivation rec { NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework AppKit"; - LUA_PATH = luaPath; - LUA_CPATH = luaCPath; - FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ gentium @@ -60,10 +50,6 @@ stdenv.mkDerivation rec { ''; postInstall = '' - wrapProgram $out/bin/sile \ - --set LUA_PATH "${luaPath};" \ - --set LUA_CPATH "${luaCPath};" \ - install -D -t $out/share/doc/sile documentation/*.pdf ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bdaffbc7d3c..918edadfe62 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5857,9 +5857,7 @@ in silc_server = callPackage ../servers/silc-server { }; - sile = callPackage ../tools/typesetting/sile { - inherit (lua52Packages) lua luaexpat lua-zlib luafilesystem lpeg luasocket luasec; - }; + sile = callPackage ../tools/typesetting/sile { }; silver-searcher = callPackage ../tools/text/silver-searcher { };