about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/xmpp
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/servers/xmpp
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/servers/xmpp')
-rw-r--r--nixpkgs/pkgs/servers/xmpp/biboumi/catch.patch30
-rw-r--r--nixpkgs/pkgs/servers/xmpp/biboumi/default.nix43
-rw-r--r--nixpkgs/pkgs/servers/xmpp/ejabberd/default.nix120
-rw-r--r--nixpkgs/pkgs/servers/xmpp/openfire/default.nix31
-rw-r--r--nixpkgs/pkgs/servers/xmpp/prosody/default.nix73
-rw-r--r--nixpkgs/pkgs/servers/xmpp/pyIRCt/default.nix42
-rw-r--r--nixpkgs/pkgs/servers/xmpp/pyMAILt/default.nix40
7 files changed, 379 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/xmpp/biboumi/catch.patch b/nixpkgs/pkgs/servers/xmpp/biboumi/catch.patch
new file mode 100644
index 000000000000..bbd0a66909fe
--- /dev/null
+++ b/nixpkgs/pkgs/servers/xmpp/biboumi/catch.patch
@@ -0,0 +1,30 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -303,27 +303,6 @@
+ endforeach()
+ 
+ #
+-## Add a rule to download the catch unit test framework
+-#
+-include(ExternalProject)
+-ExternalProject_Add(catch
+-  GIT_REPOSITORY "https://lab.louiz.org/louiz/Catch.git"
+-  PREFIX "external"
+-  UPDATE_COMMAND ""
+-  CONFIGURE_COMMAND ""
+-  BUILD_COMMAND ""
+-  INSTALL_COMMAND ""
+-  )
+-set_target_properties(catch PROPERTIES EXCLUDE_FROM_ALL TRUE)
+-ExternalProject_Get_Property(catch SOURCE_DIR)
+-if(NOT EXISTS ${CMAKE_SOURCE_DIR}/tests/catch.hpp)
+-  target_include_directories(test_suite
+-    PUBLIC "${SOURCE_DIR}/single_include/"
+-    )
+-  add_dependencies(test_suite catch)
+-endif()
+-
+-#
+ ## Add some custom rules to launch the tests
+ #
+ add_custom_target(check COMMAND "test_suite"
diff --git a/nixpkgs/pkgs/servers/xmpp/biboumi/default.nix b/nixpkgs/pkgs/servers/xmpp/biboumi/default.nix
new file mode 100644
index 000000000000..b0d3dccf30f2
--- /dev/null
+++ b/nixpkgs/pkgs/servers/xmpp/biboumi/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, fetchgit, cmake, libuuid, expat, sqlite, libidn,
+  libiconv, botan2, systemd, pkgconfig, udns, pandoc, coreutils } :
+
+stdenv.mkDerivation rec {
+  name = "biboumi-${version}";
+  version = "8.3";
+
+  src = fetchurl {
+    url = "https://git.louiz.org/biboumi/snapshot/biboumi-${version}.tar.xz";
+    sha256 = "0896f52nh8vd0idkdznv3gj6wqh1nqhjbwv0m560f0h62f01vm7k";
+  };
+
+  louiz_catch = fetchgit {
+    url = https://lab.louiz.org/louiz/Catch.git;
+    rev = "0a34cc201ef28bf25c88b0062f331369596cb7b7"; # v2.2.1
+    sha256 = "0ad0sjhmzx61a763d2ali4vkj8aa1sbknnldks7xlf4gy83jfrbl";
+  };
+
+  patches = [ ./catch.patch ];
+
+  nativeBuildInputs = [ cmake pkgconfig pandoc ];
+  buildInputs = [ libuuid expat sqlite libiconv libidn botan2 systemd
+    udns ];
+
+  preConfigure = ''
+    substituteInPlace CMakeLists.txt --replace /etc/biboumi $out/etc/biboumi
+    substituteInPlace unit/biboumi.service.cmake --replace /bin/kill ${coreutils}/bin/kill
+    cp $louiz_catch/single_include/catch.hpp tests/
+    # echo "policy_directory=$out/etc/biboumi" >> conf/biboumi.cfg
+    # TODO include conf/biboumi.cfg as example somewhere
+  '';
+
+  enableParallelBuilding = true;
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "Modern XMPP IRC gateway";
+    platforms = platforms.unix;
+    homepage = https://lab.louiz.org/louiz/biboumi;
+    license = licenses.zlib;
+    maintainers = [ maintainers.woffs ];
+  };
+}
diff --git a/nixpkgs/pkgs/servers/xmpp/ejabberd/default.nix b/nixpkgs/pkgs/servers/xmpp/ejabberd/default.nix
new file mode 100644
index 000000000000..1436af024cd7
--- /dev/null
+++ b/nixpkgs/pkgs/servers/xmpp/ejabberd/default.nix
@@ -0,0 +1,120 @@
+{ stdenv, writeScriptBin, makeWrapper, lib, fetchurl, git, cacert, libpng, libjpeg, libwebp
+, erlang, openssl, expat, libyaml, bash, gnused, gnugrep, coreutils, utillinux, procps, gd
+, flock
+, withMysql ? false
+, withPgsql ? false
+, withSqlite ? false, sqlite
+, withPam ? false, pam
+, withZlib ? true, zlib
+, withRiak ? false
+, withElixir ? false, elixir
+, withIconv ? true
+, withTools ? false
+, withRedis ? false
+}:
+
+let
+  fakegit = writeScriptBin "git" ''
+    #! ${stdenv.shell} -e
+    if [ "$1" = "describe" ]; then
+      [ -r .rev ] && cat .rev || true
+    fi
+  '';
+
+  ctlpath = lib.makeBinPath [ bash gnused gnugrep coreutils utillinux procps ];
+
+in stdenv.mkDerivation rec {
+  version = "18.06";
+  name = "ejabberd-${version}";
+
+  src = fetchurl {
+    url = "https://www.process-one.net/downloads/ejabberd/${version}/${name}.tgz";
+    sha256 = "1c4h6qrckihm8v4vm52h31j5dxg7247vk374rwz41idfb25vx7dc";
+  };
+
+  nativeBuildInputs = [ fakegit ];
+
+  buildInputs = [ erlang openssl expat libyaml gd makeWrapper ]
+    ++ lib.optional withSqlite sqlite
+    ++ lib.optional withPam pam
+    ++ lib.optional withZlib zlib
+    ++ lib.optional withElixir elixir
+    ;
+
+  # Apparently needed for Elixir
+  LANG = "en_US.UTF-8";
+
+  deps = stdenv.mkDerivation {
+    name = "ejabberd-deps-${version}";
+
+    inherit src;
+
+    configureFlags = [ "--enable-all" "--with-sqlite3=${sqlite.dev}" ];
+
+    nativeBuildInputs = [ git erlang openssl expat libyaml sqlite pam zlib elixir ];
+
+    GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
+
+    makeFlags = [ "deps" ];
+
+    phases = [ "unpackPhase" "configurePhase" "buildPhase" "installPhase" ];
+
+    installPhase = ''
+      for i in deps/*; do
+        ( cd $i
+          git reset --hard
+          git clean -ffdx
+          git describe --always --tags > .rev
+          rm -rf .git
+        )
+      done
+      rm deps/.got
+
+      cp -r deps $out
+    '';
+
+    outputHashMode = "recursive";
+    outputHashAlgo = "sha256";
+    outputHash = "1bk3yd10cq6vlgmh2qawl82m29yi5zcbsdlz17xyy76sg2ka622a";
+  };
+
+  configureFlags =
+    [ (lib.enableFeature withMysql "mysql")
+      (lib.enableFeature withPgsql "pgsql")
+      (lib.enableFeature withSqlite "sqlite")
+      (lib.enableFeature withPam "pam")
+      (lib.enableFeature withZlib "zlib")
+      (lib.enableFeature withRiak "riak")
+      (lib.enableFeature withElixir "elixir")
+      (lib.enableFeature withIconv "iconv")
+      (lib.enableFeature withTools "tools")
+      (lib.enableFeature withRedis "redis")
+    ] ++ lib.optional withSqlite "--with-sqlite3=${sqlite.dev}";
+
+  enableParallelBuilding = true;
+
+  preBuild = ''
+    cp -r $deps deps
+    chmod -R +w deps
+    patchShebangs deps
+  '';
+
+  postInstall = ''
+    sed -i \
+      -e '2iexport PATH=${ctlpath}:$PATH' \
+      -e 's,\(^ *FLOCK=\).*,\1${flock}/bin/flock,' \
+      -e 's,\(^ *JOT=\).*,\1,' \
+      -e 's,\(^ *CONNLOCKDIR=\).*,\1/var/lock/ejabberdctl,' \
+      $out/sbin/ejabberdctl
+    wrapProgram $out/lib/eimp-*/priv/bin/eimp --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ libpng libjpeg libwebp ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Open-source XMPP application server written in Erlang";
+    license = licenses.gpl2;
+    homepage = https://www.ejabberd.im;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ sander abbradar ];
+    broken = withElixir;
+  };
+}
diff --git a/nixpkgs/pkgs/servers/xmpp/openfire/default.nix b/nixpkgs/pkgs/servers/xmpp/openfire/default.nix
new file mode 100644
index 000000000000..0e6fcd5e9896
--- /dev/null
+++ b/nixpkgs/pkgs/servers/xmpp/openfire/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, jre }:
+
+stdenv.mkDerivation rec {
+  name = "openfire-${version}";
+  version  = "3_6_3";
+
+  src = fetchurl {
+    url = "http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_${version}.tar.gz";
+    sha256 = "0ibzhmh9qw4lmx45ir1i280p30npgwnj7vrkl432kj3zi7hp79q2";
+  };
+
+  buildInputs = [ jre ];
+
+  installPhase = ''
+    sed -e 's@\(common_jvm_locations=\).*@\1${jre}@' -i bin/openfire
+    cp -r . $out
+    rm -r $out/logs
+    mv $out/conf $out/conf.inst
+    ln -s /var/log/openfire $out/logs
+    ln -s /etc/openfire $out/conf
+  ''; 
+
+  meta = {
+    description = "XMPP server in Java";
+    platforms = stdenv.lib.platforms.unix;
+    # Some security advisories seem to apply, and each next version wants to
+    # write into larger parts of installation directory; installation is just
+    # unpacking, though
+    broken = true;
+  };
+}
diff --git a/nixpkgs/pkgs/servers/xmpp/prosody/default.nix b/nixpkgs/pkgs/servers/xmpp/prosody/default.nix
new file mode 100644
index 000000000000..228c074bf7ea
--- /dev/null
+++ b/nixpkgs/pkgs/servers/xmpp/prosody/default.nix
@@ -0,0 +1,73 @@
+{ stdenv, fetchurl, libidn, openssl, makeWrapper, fetchhg
+, lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop
+, withLibevent ? true, luaevent ? null
+, withDBI ? true, luadbi ? null
+# use withExtraLibs to add additional dependencies of community modules
+, withExtraLibs ? [ ]
+, withOnlyInstalledCommunityModules ? [ ]
+, withCommunityModules ? [ ] }:
+
+assert withLibevent -> luaevent != null;
+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.1";
+  name = "prosody-${version}";
+
+  src = fetchurl {
+    url = "https://prosody.im/downloads/source/${name}.tar.gz";
+    sha256 = "1ak5bkx09kscyifxhzybgp5a73jr8nki6xi05c59wwlq0wzw9gli";
+  };
+
+  communityModules = fetchhg {
+    url = "https://hg.prosody.im/prosody-modules";
+    rev = "150a7bd59043";
+    sha256 = "0nfx3lngcy88nd81gb7v4kh3nz1bzsm67bxgpd2lprk54diqcrz1";
+  };
+
+  buildInputs = [ lua5 makeWrapper libidn openssl ]
+    ++ optional withDBI luadbi;
+
+  configureFlags = [
+    "--ostype=linux"
+    "--with-lua-include=${lua5}/include"
+    "--with-lua=${lua5}"
+  ];
+
+  postInstall = ''
+      ${concatMapStringsSep "\n" (module: ''
+        cp -r $communityModules/mod_${module} $out/lib/prosody/modules/
+      '') (withCommunityModules ++ withOnlyInstalledCommunityModules)}
+      wrapProgram $out/bin/prosody \
+        --set LUA_PATH '${luaPath};' \
+        --set LUA_CPATH '${luaCPath};'
+      wrapProgram $out/bin/prosodyctl \
+        --add-flags '--config "/etc/prosody/prosody.cfg.lua"' \
+        --set LUA_PATH '${luaPath};' \
+        --set LUA_CPATH '${luaCPath};'
+    '';
+
+  passthru.communityModules = withCommunityModules;
+
+  meta = {
+    description = "Open-source XMPP application server written in Lua";
+    license = licenses.mit;
+    homepage = https://prosody.im;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ fpletz globin ];
+  };
+}
diff --git a/nixpkgs/pkgs/servers/xmpp/pyIRCt/default.nix b/nixpkgs/pkgs/servers/xmpp/pyIRCt/default.nix
new file mode 100644
index 000000000000..535fb061de9b
--- /dev/null
+++ b/nixpkgs/pkgs/servers/xmpp/pyIRCt/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchurl, xmpppy, pythonIRClib, python, pythonPackages } :
+
+stdenv.mkDerivation rec {
+  name = "pyIRCt-${version}";
+  version = "0.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/xmpppy/irc-transport-${version}.tar.gz";
+    sha256 = "0gbc0dvj1p3088b6x315yjrlwnc5vvzp0var36wlf9z60ghvk8yb";
+  };
+
+  buildInputs = [ pythonPackages.wrapPython ];
+
+  pythonPath = [
+    xmpppy pythonIRClib
+  ];
+
+  /* doConfigure should be removed if not needed */
+  # phaseNames = ["deploy" (a.makeManyWrappers "$out/share/${name}/irc.py" a.pythonWrapperArguments)];
+
+  installPhase = ''
+    mkdir -p $out/bin $out/share/${name}
+    sed -e 's@/usr/bin/@${python}/bin/@' -i irc.py
+    sed -e '/configFiles/aconfigFiles += [os.getenv("HOME")+"/.pyIRCt.xml"]' -i config.py
+    sed -e '/configFiles/aconfigFiles += [os.getenv("HOME")+"/.python-irc-transport.xml"]' -i config.py
+    sed -e '/configFiles/iimport os' -i config.py
+    cp * $out/share/${name}
+    cat > $out/bin/pyIRCt <<EOF
+      #!${stdenv.shell}
+      cd $out/share/${name}
+      ./irc.py \"$@\"
+    EOF
+    chmod a+rx  $out/bin/pyIRCt $out/share/${name}/irc.py
+    wrapPythonPrograms
+  '';
+
+  meta = with stdenv.lib; {
+    description = "IRC transport module for XMPP";
+    platforms = platforms.unix;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/servers/xmpp/pyMAILt/default.nix b/nixpkgs/pkgs/servers/xmpp/pyMAILt/default.nix
new file mode 100644
index 000000000000..b1c4d93f687e
--- /dev/null
+++ b/nixpkgs/pkgs/servers/xmpp/pyMAILt/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, python, xmpppy, pythonPackages, fetchcvs } :
+
+stdenv.mkDerivation rec {
+  name = "pyMAILt-${version}";
+  version = "20090101";
+
+  src = fetchcvs {
+		cvsRoot = ":pserver:anonymous@xmpppy.cvs.sourceforge.net:/cvsroot/xmpppy";
+		module = "xmpppy/mail-transport";
+		date = "2009-01-01";
+		sha256 = "15301252e52b4ccb2156baefed8982a2a0cce3ae8eae3caf3cc28dfa615c8d6e";
+	};
+
+  pythonPath = [ xmpppy ];
+  buildInputs = [ pythonPackages.wrapPython ];
+
+  /* doConfigure should be removed if not needed */
+  installPhase = ''
+    cd mail-transport
+    mkdir -p $out/bin $out/share/${name}
+    sed -e 's@/usr/bin/@${python}/bin/@' -i mail.py
+    sed -e '/configFiles/aconfigFiles += [os.getenv("HOME")+"/.pyMAILt.xml"]' -i config.py
+    sed -e '/configFiles/aconfigFiles += [os.getenv("HOME")+"/.python-mail-transport.xml"]' -i config.py
+    sed -e '/configFiles/iimport os' -i config.py
+    cp * $out/share/$name
+    cat > $out/bin/pyMAILt <<EOF
+      #!${stdenv.shell}
+      cd $out/share/${name}
+      ./mail.py \"$@\"
+    EOF
+    chmod a+rx  $out/bin/pyMAILt $out/share/${name}/mail.py
+    wrapPythonPrograms
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Email transport module for XMPP";
+    platforms = platforms.unix;
+    license = licenses.gpl2;
+  };
+}