aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/qtkeychain
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-04-27 17:15:05 +0200
committerJan Tojnar <jtojnar@gmail.com>2019-04-28 01:28:26 +0200
commit48316aeec1d6ff2b2ad2a8df11b0ba2a1769ec5e (patch)
treea0f630339978efb1e3f12cfd881371c2ecdeb026 /pkgs/development/libraries/qtkeychain
parentdfd8f84aef129f1978e446b5d45ef05cd4421821 (diff)
libsForQt5.qtkeychain: add libsecret support
qtkeychain uses pkg-config to detect whether libsecret is available, otherwise it just builds a stub object file. We need libsecret support to allow nextcloud-client storing passwords on Freedesktop platforms. I also fixed the Darwin dependencies not being used with Qt5, even though the build did not complain.
Diffstat (limited to 'pkgs/development/libraries/qtkeychain')
-rw-r--r--pkgs/development/libraries/qtkeychain/default.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/development/libraries/qtkeychain/default.nix b/pkgs/development/libraries/qtkeychain/default.nix
index 2e5371e285bc..3de84d859111 100644
--- a/pkgs/development/libraries/qtkeychain/default.nix
+++ b/pkgs/development/libraries/qtkeychain/default.nix
@@ -1,6 +1,7 @@
-{ stdenv, fetchFromGitHub, cmake, qt4 ? null
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, qt4 ? null
, withQt5 ? false, qtbase ? null, qttools ? null
, darwin ? null
+, libsecret
}:
assert withQt5 -> qtbase != null;
@@ -22,11 +23,14 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DQT_TRANSLATIONS_DIR=share/qt/translations" ];
- nativeBuildInputs = [ cmake ];
+ nativeBuildInputs = [ cmake ]
+ ++ stdenv.lib.optional (!stdenv.isDarwin) [ pkgconfig ] # for finding libsecret
+ ;
- buildInputs = if withQt5 then [ qtbase qttools ] else [ qt4 ]
+ buildInputs = stdenv.lib.optional (!stdenv.isDarwin) [ libsecret ]
+ ++ (if withQt5 then [ qtbase qttools ] else [ qt4 ])
++ stdenv.lib.optional stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
- CoreFoundation Security
+ CoreFoundation Security
])
;