diff --git a/pkgs/servers/web-apps/sogo/default.nix b/pkgs/servers/web-apps/sogo/default.nix index f94436c1f372..94672ffe6f10 100644 --- a/pkgs/servers/web-apps/sogo/default.nix +++ b/pkgs/servers/web-apps/sogo/default.nix @@ -1,27 +1,24 @@ { gnustep, lib, fetchFromGitHub, fetchpatch, makeWrapper, python3, lndir , openssl, openldap, sope, libmemcached, curl, libsodium, libytnef, libzip, pkg-config, nixosTests -, oath-toolkit }: +, oath-toolkit +, enableActiveSync ? false +, libwbxml }: gnustep.stdenv.mkDerivation rec { pname = "SOGo"; - version = "5.5.0"; + version = "5.7.0"; src = fetchFromGitHub { owner = "inverse-inc"; repo = pname; rev = "SOGo-${version}"; - sha256 = "1kyfn3qw299qsyivbrm487h68va99rrb3gmhpgjpwqd2xdg9aypk"; + hash = "sha256-3Xy0y1sdixy4gXhzhP9mfWeaDmOVJty+X95xCyxayPE="; }; nativeBuildInputs = [ gnustep.make makeWrapper python3 ]; - buildInputs = [ gnustep.base sope openssl libmemcached curl libsodium libytnef libzip pkg-config openldap oath-toolkit ]; + buildInputs = [ gnustep.base sope openssl libmemcached curl libsodium libytnef libzip pkg-config openldap oath-toolkit ] + ++ lib.optional enableActiveSync libwbxml; - patches = [ - # TODO: take a closer look at other patches in https://sources.debian.org/patches/sogo/ and https://github.com/Skrupellos/sogo-patches - (fetchpatch { - url = "https://salsa.debian.org/debian/sogo/-/raw/120ac6390602c811908c7fcb212a79acbc7f7f28/debian/patches/0005-Remove-build-date.patch"; - sha256 = "151i8504kwdlcirgd0pbif7cxnb1q6jsp5j7dbh9p6zw2xgwkp25"; - }) - ]; + patches = lib.optional enableActiveSync ./enable-activesync.patch; postPatch = '' # Exclude NIX_ variables @@ -68,6 +65,8 @@ gnustep.stdenv.mkDerivation rec { 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 + + rmdir $out/nix ''; passthru.tests.sogo = nixosTests.sogo; diff --git a/pkgs/servers/web-apps/sogo/enable-activesync.patch b/pkgs/servers/web-apps/sogo/enable-activesync.patch new file mode 100644 index 000000000000..2c2aba26a211 --- /dev/null +++ b/pkgs/servers/web-apps/sogo/enable-activesync.patch @@ -0,0 +1,21 @@ +--- a/ActiveSync/NSData+ActiveSync.m ++++ b/ActiveSync/NSData+ActiveSync.m +@@ -36,7 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #import + #import + +-#include ++#include + + #define WBXMLDEBUG 0 + +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -11,6 +11,7 @@ SUBPROJECTS = \ + UI \ + Tools \ + Tests/Unit \ ++ ActiveSync \ + + + include $(GNUSTEP_MAKEFILES)/aggregate.make