summary refs log tree commit diff
path: root/pkgs/servers/xmpp
diff options
context:
space:
mode:
authorFrank Doepper <github@woffs.de>2017-10-20 22:14:41 +0200
committerJoachim F <joachifm@users.noreply.github.com>2017-10-20 20:14:41 +0000
commit916c0a69f82457acae9e8161d018a76ab57e079d (patch)
tree22dc8bcc120d0a4a8ac1138d844c4badf81ec831 /pkgs/servers/xmpp
parent75a536459a45689680e1169ca0a2dda8d30d9589 (diff)
downloadnixpkgs-916c0a69f82457acae9e8161d018a76ab57e079d.tar
nixpkgs-916c0a69f82457acae9e8161d018a76ab57e079d.tar.gz
nixpkgs-916c0a69f82457acae9e8161d018a76ab57e079d.tar.bz2
nixpkgs-916c0a69f82457acae9e8161d018a76ab57e079d.tar.lz
nixpkgs-916c0a69f82457acae9e8161d018a76ab57e079d.tar.xz
nixpkgs-916c0a69f82457acae9e8161d018a76ab57e079d.tar.zst
nixpkgs-916c0a69f82457acae9e8161d018a76ab57e079d.zip
biboumi: init at 6.1 (#30193)
* biboumi: init at 6.1

TODO: integrate config in NixOS

* biboumi: remove external buildtime dep

- fetch catch.hpp in a reproducible way
- add maintainer
- enable tests
- remove git dep
- enable parallel building
- add pandoc dep for man page
- nitpicks

* biboumi: refine substitutions

- only CMakeLists.txt has to be patched regarding /etc/biboumi
- substitute /bin/kill in systemd service file
- prepare for configuring policy_directory in a future cfg file
Diffstat (limited to 'pkgs/servers/xmpp')
-rw-r--r--pkgs/servers/xmpp/biboumi/catch.patch30
-rw-r--r--pkgs/servers/xmpp/biboumi/default.nix44
2 files changed, 74 insertions, 0 deletions
diff --git a/pkgs/servers/xmpp/biboumi/catch.patch b/pkgs/servers/xmpp/biboumi/catch.patch
new file mode 100644
index 00000000000..05cf534ecfe
--- /dev/null
+++ b/pkgs/servers/xmpp/biboumi/catch.patch
@@ -0,0 +1,30 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -273,27 +273,6 @@ foreach(file ${source_all})
+ 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}/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/pkgs/servers/xmpp/biboumi/default.nix b/pkgs/servers/xmpp/biboumi/default.nix
new file mode 100644
index 00000000000..e59aaa9116c
--- /dev/null
+++ b/pkgs/servers/xmpp/biboumi/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchurl, fetchgit, cmake, libuuid, expat, sqlite, libidn,
+  libiconv, botan2, systemd, pkgconfig, udns, pandoc, procps } :
+
+stdenv.mkDerivation rec {
+  name = "biboumi-${version}";
+  version = "6.1";
+
+  src = fetchurl {
+    url = "https://git.louiz.org/biboumi/snapshot/biboumi-${version}.tar.xz";
+    sha256 = "1la1n502v2wyfm0vl8v4m0hbigkkjchi21446n9mb203fz1cvr77";
+  };
+
+  louiz_catch = fetchgit {
+    url = https://lab.louiz.org/louiz/Catch.git;
+    rev = "35f510545d55a831372d3113747bf1314ff4f2ef";
+    sha256 = "1l5b32sgr9zc2hlfr445hwwxv18sh3cn5q1xmvf588z6jyf88g2g";
+  };
+
+  patches = [ ./catch.patch ];
+
+  nativeBuildInputs = [ cmake pkgconfig pandoc ];
+  buildInputs = [ libuuid expat sqlite libiconv libidn botan2 systemd
+    udns procps ];
+
+  inherit procps;
+  preConfigure = ''
+    substituteInPlace CMakeLists.txt --replace /etc/biboumi $out/etc/biboumi
+    substituteInPlace unit/biboumi.service.cmake --replace /bin/kill $procps/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 ];
+  };
+}