@@ -1,7 +1,12 @@
1−{ stdenv, fetchFromGitHub, cmake, qt4 }:
1+{ stdenv, fetchFromGitHub, cmake, qt4 ? null
2+, withQt5 ? false, qtbase ? null, qttools ? null
3+}:
4+
5+assert withQt5 -> qtbase != null;
6+assert withQt5 -> qttools != null;
27
38stdenv.mkDerivation rec {
4− name = "qtkeychain-${version}";
9+ name = "qtkeychain-${if withQt5 then "qt5" else "qt4"}-${version}";
510 version = "0.7.0";
611
712 src = fetchFromGitHub {
@@ -13,7 +18,9 @@ stdenv.mkDerivation rec {
1318
1419 cmakeFlags = [ "-DQT_TRANSLATIONS_DIR=share/qt/translations" ];
1520
16− buildInputs = [ cmake qt4 ];
21+ nativeBuildInputs = [ cmake ];
22+
23+ buildInputs = if withQt5 then [ qtbase qttools ] else [ qt4 ];
1724
1825 meta = {
1926 description = "Platform-independent Qt API for storing passwords securely";