nixpkgs/pkgs/development/libraries/qtkeychain/default.nix
Badi Abdul-Wahid f047d5d754
qtkeychain: 0.7.0 -> 0.8.0, fix darwin build
The darwin build was failing for two reasons
  1) cmake incorrectly detected the compiler
  2) missing Frameworks

/cc ZHF #36454
2018-03-18 10:54:50 -04:00

44 lines
1.2 KiB
Nix

{ stdenv, fetchFromGitHub, cmake, qt4 ? null
, withQt5 ? false, qtbase ? null, qttools ? null
, darwin ? null
}:
assert withQt5 -> qtbase != null;
assert withQt5 -> qttools != null;
assert stdenv.isDarwin -> darwin != null;
stdenv.mkDerivation rec {
name = "qtkeychain-${if withQt5 then "qt5" else "qt4"}-${version}";
version = "0.8.0";
src = fetchFromGitHub {
owner = "frankosterfeld";
repo = "qtkeychain";
rev = "v${version}";
sha256 = "04v6ymkw7qd1pf9lwijgqrl89w2hhsnqgz7dm4cdrh8i8dffpn52";
};
cmakeFlags = [ "-DQT_TRANSLATIONS_DIR=share/qt/translations" ]
++ stdenv.lib.optional stdenv.isDarwin [
# correctly detect the compiler
# for details see cmake --help-policy CMP0025
"-DCMAKE_POLICY_DEFAULT_CMP0025=NEW"
]
;
nativeBuildInputs = [ cmake ];
buildInputs = if withQt5 then [ qtbase qttools ] else [ qt4 ]
++ stdenv.lib.optional stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
CoreFoundation Security
])
;
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.unix;
};
}