2023-05-24 13:37:59 +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";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.14.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "frankosterfeld";
|
|
|
|
repo = "qtkeychain";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-LclYOuIYn+jYCvg69uHFlV3VcZ2KWdr8lFyCSBIB7Kw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# HACK `propagatedSandboxProfile` does not appear to actually propagate the sandbox profile from `qtbase`
|
|
|
|
sandboxProfile = toString qtbase.__propagatedSandboxProfile or null;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_WITH_QT6=${if lib.versions.major qtbase.version == "6" then "ON" else "OFF"}"
|
|
|
|
"-DQT_TRANSLATIONS_DIR=share/qt/translations"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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 [
|
2023-05-24 13:37:59 +00:00
|
|
|
CoreFoundation
|
|
|
|
Security
|
|
|
|
];
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
|
|
|
|
# we previously had a note in here saying to run this check manually, so we might as
|
|
|
|
# well do it automatically. It seems like a perfectly valid sanity check, but I
|
|
|
|
# have no idea *why* we might need it
|
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
|
|
|
|
grep --quiet -R 'set(PACKAGE_VERSION "${version}"' .
|
|
|
|
|
|
|
|
runHook postInstallCheck
|
|
|
|
'';
|
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
|
|
|
};
|
|
|
|
}
|