summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2018-11-23 08:31:31 +0100
committerworldofpeace <worldofpeace@users.noreply.github.com>2018-11-23 02:31:31 -0500
commite75f922e910d674a09fb2342500b0add191bad68 (patch)
tree0f7f961a608eb713ee00a45c6f4ae0261c58fdfe /pkgs
parent24b381e235d95bad877055f5c717d8633b38ae0e (diff)
downloadnixpkgs-e75f922e910d674a09fb2342500b0add191bad68.tar
nixpkgs-e75f922e910d674a09fb2342500b0add191bad68.tar.gz
nixpkgs-e75f922e910d674a09fb2342500b0add191bad68.tar.bz2
nixpkgs-e75f922e910d674a09fb2342500b0add191bad68.tar.lz
nixpkgs-e75f922e910d674a09fb2342500b0add191bad68.tar.xz
nixpkgs-e75f922e910d674a09fb2342500b0add191bad68.tar.zst
nixpkgs-e75f922e910d674a09fb2342500b0add191bad68.zip
nextcloud-client: 2.3.3 -> 2.5.0 (#50463)
Updates to the latest version of the desktop client available. Tested
the config migration from `nextcloud-client` 2.3.3 with a Nextcloud
14.0.3 instance (hosted using `services.nextcloud`).

Additionally the derivation required the following changes:

* Dropped `Qt5Sql` patch: this has been fixed upstream and isn't needed
  anymore (furthermore their CMake structure has changed and the patch
  wouldn't apply anymore on 2.5.0).

* Moved to a new upstream repository (nextcloud/desktop), kept
  `fetchgit` to properly fetch submodules.

* Added OpenSSL 1.1 integration: `libsync` (the syncing provided by this
  package) requires 1.1, furthermore the linking flags had to be fixed
  manually by passing `NIX_LDFLAGS` to the derivation.

Furthermore I moved the support for a Gnome3 keyring into its own
wrapper to avoid a full rebuild of the package whenever you alter
`withGnomeKeyring` in an override expressions.

It's still possible to enable keyring (now without recompile) like this:

```
nextcloud-client.override { withGnomeKeyring = true; }
```

To override the derivation itself you now have to use
`nextcloud-client-unwrapped`:

```
nextcloud-client-unwrapped.overrideAttrs (old: {
   src = yoursrc;
})
```
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/nextcloud-client/default.nix31
-rw-r--r--pkgs/applications/networking/nextcloud-client/find-sql.patch12
-rw-r--r--pkgs/applications/networking/nextcloud-client/wrapper.nix14
-rw-r--r--pkgs/top-level/all-packages.nix6
4 files changed, 30 insertions, 33 deletions
diff --git a/pkgs/applications/networking/nextcloud-client/default.nix b/pkgs/applications/networking/nextcloud-client/default.nix
index 6ed5e63cd0f..3d54ff3a7c3 100644
--- a/pkgs/applications/networking/nextcloud-client/default.nix
+++ b/pkgs/applications/networking/nextcloud-client/default.nix
@@ -1,37 +1,31 @@
 { stdenv, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite
-, inotify-tools, withGnomeKeyring ? false, makeWrapper, libgnome-keyring }:
+, inotify-tools, makeWrapper, libgnome-keyring, openssl_1_1, pcre, qtwebengine
+}:
 
 stdenv.mkDerivation rec {
   name = "nextcloud-client-${version}";
-  version = "2.3.3";
+  version = "2.5.0";
 
   src = fetchgit {
-    url = "git://github.com/nextcloud/client_theming.git";
-    rev = "ab40efe1e1475efddd636c09251d8917627261da";
-    sha256 = "19a1kqydgx47sa1a917j46zlbc5g9nynsanasyad9c8sqi0qvyip";
+    url = "git://github.com/nextcloud/desktop.git";
+    rev = "refs/tags/v${version}";
+    sha256 = "1wz5bz4nmni0qxzcvgmpg9ywrfixzvdd7ixgqmdm4d8g6dm8pk9k";
     fetchSubmodules = true;
   };
 
-  patches = [ ./find-sql.patch ];
-  patchFlags = "-d client -p1";
-
   nativeBuildInputs = [ pkgconfig cmake ];
 
-  buildInputs = [ qtbase qtwebkit qtkeychain qttools sqlite ]
-    ++ stdenv.lib.optional stdenv.isLinux inotify-tools
-    ++ stdenv.lib.optional withGnomeKeyring makeWrapper;
+  buildInputs = [ qtbase qtwebkit qtkeychain qttools qtwebengine sqlite openssl_1_1.out pcre inotify-tools ];
 
   enableParallelBuilding = true;
 
-  dontUseCmakeBuildDir = true;
-
-  cmakeDir = "client";
+  NIX_LDFLAGS = "${openssl_1_1.out}/lib/libssl.so ${openssl_1_1.out}/lib/libcrypto.so";
 
   cmakeFlags = [
     "-UCMAKE_INSTALL_LIBDIR"
     "-DCMAKE_BUILD_TYPE=Release"
-    "-DOEM_THEME_DIR=${src}/nextcloudtheme"
-  ] ++ stdenv.lib.optionals stdenv.isLinux [
+    "-DOPENSSL_LIBRARIES=${openssl_1_1.out}/lib"
+    "-DOPENSSL_INCLUDE_DIR=${openssl_1_1.dev}/include"
     "-DINOTIFY_LIBRARY=${inotify-tools}/lib/libinotifytools.so"
     "-DINOTIFY_INCLUDE_DIR=${inotify-tools}/include"
   ];
@@ -39,16 +33,13 @@ stdenv.mkDerivation rec {
   postInstall = ''
     sed -i 's/\(Icon.*\)=nextcloud/\1=Nextcloud/g' \
       $out/share/applications/nextcloud.desktop
-  '' + stdenv.lib.optionalString (withGnomeKeyring) ''
-    wrapProgram "$out/bin/nextcloud" \
-      --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libgnome-keyring ]}
   '';
 
   meta = with stdenv.lib; {
     description = "Nextcloud themed desktop client";
     homepage = https://nextcloud.com;
     license = licenses.gpl2;
-    maintainers = with maintainers; [ caugner ];
+    maintainers = with maintainers; [ caugner ma27 ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/networking/nextcloud-client/find-sql.patch b/pkgs/applications/networking/nextcloud-client/find-sql.patch
deleted file mode 100644
index baf6a4fbf49..00000000000
--- a/pkgs/applications/networking/nextcloud-client/find-sql.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/cmake/modules/QtVersionAbstraction.cmake b/cmake/modules/QtVersionAbstraction.cmake
-index 5bd853c84..93ddf3cf8 100644
---- a/cmake/modules/QtVersionAbstraction.cmake
-+++ b/cmake/modules/QtVersionAbstraction.cmake
-@@ -17,6 +17,7 @@ if( Qt5Core_FOUND )
-     message(STATUS "Found Qt5 core, checking for further dependencies...")
-     find_package(Qt5Network REQUIRED)
-     find_package(Qt5Xml REQUIRED)
-+    find_package(Qt5Sql REQUIRED)
-     find_package(Qt5Concurrent REQUIRED)
-     if(UNIT_TESTING)
-         find_package(Qt5Test REQUIRED)
diff --git a/pkgs/applications/networking/nextcloud-client/wrapper.nix b/pkgs/applications/networking/nextcloud-client/wrapper.nix
new file mode 100644
index 00000000000..292cbaa1c40
--- /dev/null
+++ b/pkgs/applications/networking/nextcloud-client/wrapper.nix
@@ -0,0 +1,14 @@
+{ lib, nextcloud-client, makeWrapper, symlinkJoin, withGnomeKeyring ? false, libgnome-keyring }:
+
+if (!withGnomeKeyring) then nextcloud-client else symlinkJoin {
+  name = "${nextcloud-client.name}-with-gnome-keyring";
+  paths = [ nextcloud-client ];
+  nativeBuildInputs = [ makeWrapper ];
+
+  postBuild = ''
+    wrapProgram "$out/bin/nextcloud" \
+      --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libgnome-keyring ]}
+  '';
+
+  inherit (nextcloud-client) meta;
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 9ad7474c5ea..8265c9cf266 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -4374,7 +4374,11 @@ with pkgs;
 
   nextcloud = callPackage ../servers/nextcloud { };
 
-  nextcloud-client = libsForQt5.callPackage ../applications/networking/nextcloud-client { };
+  nextcloud-client-unwrapped = libsForQt5.callPackage ../applications/networking/nextcloud-client { };
+
+  nextcloud-client = callPackage ../applications/networking/nextcloud-client/wrapper.nix {
+    nextcloud-client = nextcloud-client-unwrapped;
+  };
 
   nextcloud-news-updater = callPackage ../servers/nextcloud/news-updater.nix { };