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