about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/xmpp
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-07-14 15:50:11 +0000
committerAlyssa Ross <hi@alyssa.is>2019-08-14 00:01:17 +0000
commit69a15dd2dc85051ba1436613805f9286850e0596 (patch)
treed53cec2bb5b8d07df1d1919b212cb2deb3628cd6 /nixpkgs/pkgs/servers/xmpp
parent6941276da135c3eb3b50e0be33d92e7d01ccba9a (diff)
parentbeff2f8d75ef2c65017fb25e251337c6bb2e950d (diff)
downloadnixlib-69a15dd2dc85051ba1436613805f9286850e0596.tar
nixlib-69a15dd2dc85051ba1436613805f9286850e0596.tar.gz
nixlib-69a15dd2dc85051ba1436613805f9286850e0596.tar.bz2
nixlib-69a15dd2dc85051ba1436613805f9286850e0596.tar.lz
nixlib-69a15dd2dc85051ba1436613805f9286850e0596.tar.xz
nixlib-69a15dd2dc85051ba1436613805f9286850e0596.tar.zst
nixlib-69a15dd2dc85051ba1436613805f9286850e0596.zip
Merge commit 'beff2f8d75ef2c65017fb25e251337c6bb2e950d'
v#	modified:   nixpkgs/pkgs/tools/networking/dhcpcd/default.nix
Diffstat (limited to 'nixpkgs/pkgs/servers/xmpp')
-rw-r--r--nixpkgs/pkgs/servers/xmpp/prosody/default.nix32
1 files changed, 15 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/servers/xmpp/prosody/default.nix b/nixpkgs/pkgs/servers/xmpp/prosody/default.nix
index 28be53b4e6cb..928c48329656 100644
--- a/nixpkgs/pkgs/servers/xmpp/prosody/default.nix
+++ b/nixpkgs/pkgs/servers/xmpp/prosody/default.nix
@@ -12,17 +12,6 @@ assert withDBI -> luadbi != null;
 
 with stdenv.lib;
 
-let
-  libs        = [ luasocket luasec luaexpat luafilesystem luabitop ]
-                ++ optional withLibevent luaevent
-                ++ optional withDBI luadbi
-                ++ withExtraLibs;
-  getPath     = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}";
-  getLuaPath  = lib : getPath lib "lua";
-  getLuaCPath = lib : getPath lib "so";
-  luaPath     = concatStringsSep ";" (map getLuaPath  libs);
-  luaCPath    = concatStringsSep ";" (map getLuaCPath libs);
-in
 
 stdenv.mkDerivation rec {
   version = "0.11.2"; # also update communityModules
@@ -42,8 +31,17 @@ stdenv.mkDerivation rec {
     sha256 = "0bzn92j48krb2zhp9gn5bbn5sg0qv15j5lpxfszwqdln3lpmrvzg";
   };
 
-  buildInputs = [ lua5 makeWrapper libidn openssl ]
-    ++ optional withDBI luadbi;
+  buildInputs = [
+    lua5 makeWrapper libidn openssl
+  ]
+  # Lua libraries
+  ++ [
+    luasocket luasec luaexpat luafilesystem luabitop
+  ]
+  ++ optional withLibevent luaevent
+  ++ optional withDBI luadbi
+  ++ withExtraLibs;
+
 
   configureFlags = [
     "--ostype=linux"
@@ -56,12 +54,12 @@ stdenv.mkDerivation rec {
         cp -r $communityModules/mod_${module} $out/lib/prosody/modules/
       '') (withCommunityModules ++ withOnlyInstalledCommunityModules)}
       wrapProgram $out/bin/prosody \
-        --set LUA_PATH '${luaPath};' \
-        --set LUA_CPATH '${luaCPath};'
+        --prefix LUA_PATH ';' "$NIX_LUA_PATH" \
+        --prefix LUA_CPATH ';' "$NIX_LUA_CPATH"
       wrapProgram $out/bin/prosodyctl \
         --add-flags '--config "/etc/prosody/prosody.cfg.lua"' \
-        --set LUA_PATH '${luaPath};' \
-        --set LUA_CPATH '${luaCPath};'
+        --prefix LUA_PATH ';' "$NIX_LUA_PATH" \
+        --prefix LUA_CPATH ';' "$NIX_LUA_CPATH"
     '';
 
   passthru.communityModules = withCommunityModules;