2021-08-05 07:26:28 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, qtbase, qttools
|
|
|
|
, CoreFoundation, Security
|
2019-04-27 15:15:05 +00:00
|
|
|
, libsecret
|
2016-09-07 09:36:24 +00:00
|
|
|
}:
|
|
|
|
|
2014-11-17 00:21:09 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-08-05 07:26:28 +00:00
|
|
|
pname = "qtkeychain";
|
|
|
|
version = "0.12.0"; # verify after nix-build with `grep -R "set(PACKAGE_VERSION " result/`
|
2014-11-17 00:21:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "frankosterfeld";
|
|
|
|
repo = "qtkeychain";
|
|
|
|
rev = "v${version}";
|
2021-08-05 07:26:28 +00:00
|
|
|
sha256 = "0gi1nx4bcc1vwfw41cif3xi2i59229vy0kc2r5959d8n6yv31kfr"; # v0.9.1
|
2014-11-17 00:21:09 +00:00
|
|
|
};
|
|
|
|
|
2021-01-12 11:50:23 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2021-08-05 07:26:28 +00:00
|
|
|
patches = [ ./0002-Fix-install-name-Darwin.patch ];
|
2018-09-05 07:28:50 +00:00
|
|
|
|
2019-01-26 04:32:44 +00:00
|
|
|
cmakeFlags = [ "-DQT_TRANSLATIONS_DIR=share/qt/translations" ];
|
2014-11-17 00:21:09 +00:00
|
|
|
|
2019-04-27 15:15:05 +00:00
|
|
|
nativeBuildInputs = [ cmake ]
|
2021-01-21 17:00:13 +00:00
|
|
|
++ lib.optionals (!stdenv.isDarwin) [ pkg-config ] # for finding libsecret
|
2019-04-27 15:15:05 +00:00
|
|
|
;
|
2016-09-07 09:36:24 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
buildInputs = lib.optionals (!stdenv.isDarwin) [ libsecret ]
|
2021-08-05 07:26:28 +00:00
|
|
|
++ [ qtbase qttools ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
2019-04-27 15:15:05 +00:00
|
|
|
CoreFoundation Security
|
2021-08-05 07:26:28 +00:00
|
|
|
]
|
2018-03-11 23:44:55 +00:00
|
|
|
;
|
2014-11-17 00:21:09 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Platform-independent Qt API for storing passwords securely";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/frankosterfeld/qtkeychain";
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
platforms = lib.platforms.unix;
|
2014-11-17 00:21:09 +00:00
|
|
|
};
|
|
|
|
}
|