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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 86fa34a3b430..23c071673c83 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9288,6 +9288,10 @@ in qca-qt5 = callPackage ../development/libraries/qca-qt5 { }; + qtkeychain = callPackage ../development/libraries/qtkeychain { + withQt5 = true; + }; + quazip = callPackage ../development/libraries/quazip { qt = qtbase; };