nixpkgs/pkgs/development/libraries/qtkeychain/default.nix

40 lines
1.2 KiB
Nix
Raw Normal View History

{ 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.9.1"; # verify after nix-build with `grep -R "set(PACKAGE_VERSION " result/`
src = fetchFromGitHub {
owner = "frankosterfeld";
repo = "qtkeychain";
rev = "v${version}";
sha256 = "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"; # v0.9.1
};
2018-09-05 08:28:50 +01:00
patches = if withQt5 then null else [ ./0001-Fixes-build-with-Qt4.patch ];
cmakeFlags = [ "-DQT_TRANSLATIONS_DIR=share/qt/translations" ];
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;
2014-11-18 19:33:18 +00:00
license = stdenv.lib.licenses.bsd3;
platforms = stdenv.lib.platforms.unix;
};
}