nixpkgs/pkgs/development/libraries/qtkeychain/default.nix
aszlig 1187b00e58
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>
2016-09-07 11:43:39 +02:00

32 lines
879 B
Nix

{ stdenv, fetchFromGitHub, cmake, qt4 ? null
, withQt5 ? false, qtbase ? null, qttools ? null
}:
assert withQt5 -> qtbase != null;
assert withQt5 -> qttools != null;
stdenv.mkDerivation rec {
name = "qtkeychain-${if withQt5 then "qt5" else "qt4"}-${version}";
version = "0.7.0";
src = fetchFromGitHub {
owner = "frankosterfeld";
repo = "qtkeychain";
rev = "v${version}";
sha256 = "04v6ymkw7qd1pf9lwijgqrl89w2hhsnqgz7dm4cdrh8i8dffpn52";
};
cmakeFlags = [ "-DQT_TRANSLATIONS_DIR=share/qt/translations" ];
nativeBuildInputs = [ cmake ];
buildInputs = if withQt5 then [ qtbase qttools ] else [ qt4 ];
meta = {
description = "Platform-independent Qt API for storing passwords securely";
homepage = "https://github.com/frankosterfeld/qtkeychain";
license = stdenv.lib.licenses.bsd3;
platforms = stdenv.lib.platforms.linux;
};
}