aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/qtkeychain
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-09-07 11:36:24 +0200
committeraszlig <aszlig@redmoonstudios.org>2016-09-07 11:43:39 +0200
commit1187b00e5872c8b65919158f2f908efb29117649 (patch)
tree611e17b089533222bba5f72cfcfbc777eb5a67e8 /pkgs/development/libraries/qtkeychain
parenteeebc13e033800bbbe394d358550a4989a2167c6 (diff)
qtkeychain: Allow building with Qt 5
So far we don't yet need the Qt 5 build for qtkeychain because the two packages that depend on it are still using Qt 4. However, the next upstream version of Tomahawk for example already uses Qt 5, so let's prepare for that. Tested building against Tomahawk Git master with qt5.qtkeychain. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/development/libraries/qtkeychain')
-rw-r--r--pkgs/development/libraries/qtkeychain/default.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/development/libraries/qtkeychain/default.nix b/pkgs/development/libraries/qtkeychain/default.nix
index 18f53d458348..f0e7f958e402 100644
--- a/pkgs/development/libraries/qtkeychain/default.nix
+++ b/pkgs/development/libraries/qtkeychain/default.nix
@@ -1,7 +1,12 @@
-{ stdenv, fetchFromGitHub, cmake, qt4 }:
+{ stdenv, fetchFromGitHub, cmake, qt4 ? null
+, withQt5 ? false, qtbase ? null, qttools ? null
+}:
+
+assert withQt5 -> qtbase != null;
+assert withQt5 -> qttools != null;
stdenv.mkDerivation rec {
- name = "qtkeychain-${version}";
+ name = "qtkeychain-${if withQt5 then "qt5" else "qt4"}-${version}";
version = "0.7.0";
src = fetchFromGitHub {
@@ -13,7 +18,9 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DQT_TRANSLATIONS_DIR=share/qt/translations" ];
- buildInputs = [ cmake qt4 ];
+ nativeBuildInputs = [ cmake ];
+
+ buildInputs = if withQt5 then [ qtbase qttools ] else [ qt4 ];
meta = {
description = "Platform-independent Qt API for storing passwords securely";