Merge pull request #181953 from helsinki-systems/upd/sogo

This commit is contained in:
Lassulus 2022-07-20 20:36:17 +02:00 committed by GitHub
commit a115cf16e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 11 deletions

View file

@ -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;

View file

@ -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 <NGExtensions/NGBase64Coding.h>
#import <NGExtensions/NSObject+Logs.h>
-#include <wbxml/wbxml.h>
+#include <libwbxml-1.0/wbxml/wbxml.h>
#define WBXMLDEBUG 0
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -11,6 +11,7 @@ SUBPROJECTS = \
UI \
Tools \
Tests/Unit \
+ ActiveSync \
include $(GNUSTEP_MAKEFILES)/aggregate.make