diff --git a/pkgs/development/libraries/sope/default.nix b/pkgs/development/libraries/sope/default.nix new file mode 100644 index 00000000000000..d604caf9cf0326 --- /dev/null +++ b/pkgs/development/libraries/sope/default.nix @@ -0,0 +1,46 @@ +{ gnustep, lib, fetchFromGitHub , libxml2, openssl_1_1 +, openldap, mysql ? null, postgresql }: with lib; gnustep.stdenv.mkDerivation rec { + pname = "sope"; + version = "4.0.8"; + + src = fetchFromGitHub { + owner = "inverse-inc"; + repo = pname; + rev = "SOPE-${version}"; + sha256 = "0kd7v06wfqgrcazhbi92mpdcjvh1khqkvq34rn6hiz30qxj2qmkk"; + }; + + nativeBuildInputs = [ gnustep.make ]; + buildInputs = [ gnustep.base libxml2 openssl_1_1 ] + ++ optional (openldap != null) openldap + ++ optional (mysql != null) mysql + ++ optional (postgresql != null) postgresql; + + postPatch = '' + # Exclude NIX_ variables + sed -i 's/grep GNUSTEP_/grep ^GNUSTEP_/g' configure + ''; + + preConfigure = '' + export DESTDIR="$out" + ''; + + configureFlags = [ "--prefix=" "--disable-debug" "--enable-xml" "--with-ssl=ssl" ] + ++ optional (openldap != null) "--enable-openldap" + ++ optional (mysql != null) "--enable-mysql" + ++ optional (postgresql != null) "--enable-postgresql"; + + # Yes, this is ugly. + preFixup = '' + cp -rlPa $out/nix/store/*/* $out + rm -rf $out/nix/store + ''; + + meta = { + description = "An extensive set of frameworks which form a complete Web application server environment in Objective-C"; + license = licenses.publicDomain; + homepage = "https://github.com/inverse-inc/sope"; + platforms = platforms.linux; + maintainers = with maintainers; [ das_j ]; + }; +} diff --git a/pkgs/servers/web-apps/sogo/default.nix b/pkgs/servers/web-apps/sogo/default.nix new file mode 100644 index 00000000000000..c3a4f70b58d47d --- /dev/null +++ b/pkgs/servers/web-apps/sogo/default.nix @@ -0,0 +1,68 @@ +{ gnustep, lib, fetchFromGitHub, makeWrapper, python2, lndir +, openssl_1_1, openldap, sope, libmemcached, curl }: with lib; gnustep.stdenv.mkDerivation rec { + pname = "SOGo"; + version = "4.0.8"; + + src = fetchFromGitHub { + owner = "inverse-inc"; + repo = pname; + rev = "SOGo-${version}"; + sha256 = "10d2kz4vffspr3wh35dvj65lr57sr1gk0hy6hdn2nsygh4agl9nj"; + }; + + nativeBuildInputs = [ gnustep.make makeWrapper python2 ]; + buildInputs = [ gnustep.base sope openssl_1_1 libmemcached (curl.override { openssl = openssl_1_1; }) ] + ++ optional (openldap != null) openldap; + + postPatch = '' + # Exclude NIX_ variables + sed -i 's/grep GNUSTEP_/grep ^GNUSTEP_/g' configure + + # Disable argument verification because $out is not a GNUStep prefix + sed -i 's/^validateArgs$//g' configure + + # Patch exception-generating python scripts + patchShebangs . + + # Move all GNUStep makefiles to a common directory + mkdir -p makefiles + cp -r {${gnustep.make},${sope}}/share/GNUstep/Makefiles/* makefiles + + # Modify the search path for GNUStep makefiles + find . -type f -name GNUmakefile -exec sed -i "s:\\$.GNUSTEP_MAKEFILES.:$PWD/makefiles:g" {} + + ''; + + configureFlags = [ "--disable-debug" "--with-ssl=ssl" ]; + + preFixup = '' + # Create gnustep.conf + mkdir -p $out/share/GNUstep + cp ${gnustep.make}/etc/GNUstep/GNUstep.conf $out/share/GNUstep/ + sed -i "s:${gnustep.make}:$out:g" $out/share/GNUstep/GNUstep.conf + + # Link in GNUstep base + ${lndir}/bin/lndir ${gnustep.base}/lib/GNUstep/ $out/lib/GNUstep/ + + # Link in sope + ${lndir}/bin/lndir ${sope}/ $out/ + + # sbin fixup + mkdir -p $out/bin + mv $out/sbin/* $out/bin + rmdir $out/sbin + + # Make sogo find its files + for bin in $out/bin/*; do + wrapProgram $bin --prefix LD_LIBRARY_PATH : $out/lib/sogo --prefix GNUSTEP_CONFIG_FILE : $out/share/GNUstep/GNUstep.conf + done + ''; + + meta = { + description = "Very fast and scalable modern collaboration suite (groupware)"; + license = with licenses; [ gpl2 lgpl21 ]; + homepage = "https://sogo.nu/"; + platforms = platforms.linux; + maintainers = with maintainers; [ das_j ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6903fc15ef1136..39bb09c7287e4c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12951,6 +12951,7 @@ in mkLibsForQt5 = self: with self; { + ### KDE FRAMEWORKS inherit (kdeFrameworks.override { libsForQt5 = self; }) @@ -13365,6 +13366,8 @@ in sonic = callPackage ../development/libraries/sonic { }; + sope = pkgs.callPackage ../development/libraries/sope { }; + soprano = callPackage ../development/libraries/soprano { }; soqt = callPackage ../development/libraries/soqt { }; @@ -14935,6 +14938,8 @@ in smcroute = callPackage ../servers/smcroute { }; + sogo = callPackage ../servers/web-apps/sogo { }; + spawn_fcgi = callPackage ../servers/http/spawn-fcgi { }; squid = callPackage ../servers/squid { };