summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRuben Maher <r@rkm.id.au>2017-09-13 08:59:16 +0930
committerRuben Maher <r@rkm.id.au>2017-09-14 08:42:55 +0930
commite828dcb5cd4ae321dde053d2eb3a24992b42f167 (patch)
tree42faab7643fd8843bbcdcd93ca756fd93b1ddbcb /pkgs
parent4ce18c836759619167f76e76f6548127617261ea (diff)
downloadnixpkgs-e828dcb5cd4ae321dde053d2eb3a24992b42f167.tar
nixpkgs-e828dcb5cd4ae321dde053d2eb3a24992b42f167.tar.gz
nixpkgs-e828dcb5cd4ae321dde053d2eb3a24992b42f167.tar.bz2
nixpkgs-e828dcb5cd4ae321dde053d2eb3a24992b42f167.tar.lz
nixpkgs-e828dcb5cd4ae321dde053d2eb3a24992b42f167.tar.xz
nixpkgs-e828dcb5cd4ae321dde053d2eb3a24992b42f167.tar.zst
nixpkgs-e828dcb5cd4ae321dde053d2eb3a24992b42f167.zip
nextcloud-client: provide optional gnome-keyring integration
`qtkeyring` can use `gnome-keyring`, but it needs some help to find it.

I have not enabled this by default because not everyone who uses this will want
to pull in GNOME dependencies.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/nextcloud-client/default.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/applications/networking/nextcloud-client/default.nix b/pkgs/applications/networking/nextcloud-client/default.nix
index aa6bb6d884c..081f765a3e8 100644
--- a/pkgs/applications/networking/nextcloud-client/default.nix
+++ b/pkgs/applications/networking/nextcloud-client/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, sqlite
-, inotify-tools }:
+, inotify-tools, withGnomeKeyring ? false, makeWrapper, libgnome_keyring }:
 
 stdenv.mkDerivation rec {
   name = "nextcloud-client-${version}";
@@ -13,8 +13,10 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ pkgconfig cmake ];
+
   buildInputs = [ qtbase qtwebkit qtkeychain sqlite ]
-    ++ stdenv.lib.optional stdenv.isLinux inotify-tools;
+    ++ stdenv.lib.optional stdenv.isLinux inotify-tools
+    ++ stdenv.lib.optional withGnomeKeyring makeWrapper;
 
   enableParallelBuilding = true;
 
@@ -31,6 +33,11 @@ stdenv.mkDerivation rec {
     "-DINOTIFY_INCLUDE_DIR=${inotify-tools}/include"
   ];
 
+  postInstall = 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;