about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarkus Kohlhase <mail@markus-kohlhase.de>2014-10-15 03:57:00 +0200
committerMarkus Kohlhase <mail@markus-kohlhase.de>2014-10-15 03:57:00 +0200
commit5308d3284bf2bb7f363cbf65d0b95b448e879784 (patch)
tree7932002bb50956867aab9d7a6609728431c39739
parent163b53f70659d3c88385edfa2a0b005ae152f94b (diff)
downloadnixlib-5308d3284bf2bb7f363cbf65d0b95b448e879784.tar
nixlib-5308d3284bf2bb7f363cbf65d0b95b448e879784.tar.gz
nixlib-5308d3284bf2bb7f363cbf65d0b95b448e879784.tar.bz2
nixlib-5308d3284bf2bb7f363cbf65d0b95b448e879784.tar.lz
nixlib-5308d3284bf2bb7f363cbf65d0b95b448e879784.tar.xz
nixlib-5308d3284bf2bb7f363cbf65d0b95b448e879784.tar.zst
nixlib-5308d3284bf2bb7f363cbf65d0b95b448e879784.zip
prosody: added websocket support
-rw-r--r--nixos/modules/services/networking/prosody.nix5
-rw-r--r--pkgs/servers/xmpp/prosody/default.nix13
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 16 insertions, 4 deletions
diff --git a/nixos/modules/services/networking/prosody.nix b/nixos/modules/services/networking/prosody.nix
index 51089d00244c..f82f8bfddbb7 100644
--- a/nixos/modules/services/networking/prosody.nix
+++ b/nixos/modules/services/networking/prosody.nix
@@ -91,6 +91,11 @@ let
       description = "Serve static files from a directory over HTTP";
     };
 
+    websocket = mkOption {
+      default = false;
+      description = "Enable WebSocket support";
+    };
+
   };
 
   createSSLOptsStr = o:
diff --git a/pkgs/servers/xmpp/prosody/default.nix b/pkgs/servers/xmpp/prosody/default.nix
index 4bd1b594c268..586f11085a21 100644
--- a/pkgs/servers/xmpp/prosody/default.nix
+++ b/pkgs/servers/xmpp/prosody/default.nix
@@ -1,7 +1,7 @@
-{ stdenv, fetchurl, lua5, luasocket, luasec, luaexpat, luafilesystem, libidn, openssl, makeWrapper }:
+{ stdenv, fetchurl, lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop, libidn, openssl, makeWrapper, fetchhg }:
 
 let
-  libs        = [ luasocket luasec luaexpat luafilesystem ];
+  libs        = [ luasocket luasec luaexpat luafilesystem luabitop ];
   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";
@@ -17,7 +17,13 @@ stdenv.mkDerivation rec {
     sha256 = "be87cf31901a25477869b4ebd52e298f63a5effacae526911a0be876cc82e1c6";
   };
 
-  buildInputs = [ lua5 luasocket luasec luaexpat libidn openssl makeWrapper ];
+  communityModules = fetchhg {
+    url = "http://prosody-modules.googlecode.com/hg/";
+    rev = "4b55110b0aa8";
+    sha256 = "0010x2rl9f9ihy2nwqan2jdlz25433srj2zna1xh10490mc28hij";
+  };
+
+  buildInputs = [ lua5 luasocket luasec luaexpat luabitop libidn openssl makeWrapper ];
 
   configureFlags = [
     "--ostype=linux"
@@ -26,6 +32,7 @@ stdenv.mkDerivation rec {
   ];
 
   postInstall = ''
+      cp $communityModules/mod_websocket/mod_websocket.lua $out/lib/prosody/modules/
       wrapProgram $out/bin/prosody \
         --set LUA_PATH '"${luaPath};"' \
         --set LUA_CPATH '"${luaCPath};"'
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 593156215d29..38b968043b25 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7139,7 +7139,7 @@ let
   prosody = recurseIntoAttrs (
     callPackage ../servers/xmpp/prosody {
       lua5 = lua5_1;
-      inherit (lua51Packages) luasocket luasec luaexpat luafilesystem;
+      inherit (lua51Packages) luasocket luasec luaexpat luafilesystem luabitop;
   });
 
   elasticmq = callPackage ../servers/elasticmq { };