98881b1e92
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/qtkeychain-qt5/versions.
44 lines
1.3 KiB
Nix
44 lines
1.3 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.9.0"; # verify after nix-build with `grep -R "set(PACKAGE_VERSION " result/`
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "frankosterfeld";
|
|
repo = "qtkeychain";
|
|
rev = "v${version}";
|
|
sha256 = "1vff0jrycq6c204ch0w7fix5bsv90aw8pl9yiicx9r5ady0i29m7"; # v0.9.0
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|