2019-10-05 04:57:55 +01:00
|
|
|
{ lib, mkDerivation, fetchFromGitHub
|
2019-11-30 11:20:35 +00:00
|
|
|
, git, gnupg, pass, pwgen, qrencode
|
2019-12-20 21:31:29 +00:00
|
|
|
, fetchpatch
|
2019-10-05 05:08:51 +01:00
|
|
|
, qtbase, qtsvg, qttools, qmake
|
2019-08-28 01:08:28 +01:00
|
|
|
}:
|
2015-06-25 14:37:15 +01:00
|
|
|
|
2019-08-08 11:15:50 +01:00
|
|
|
mkDerivation rec {
|
2019-03-21 20:13:18 +00:00
|
|
|
pname = "qtpass";
|
2019-10-23 20:24:27 +01:00
|
|
|
version = "1.3.2";
|
2015-06-25 14:37:15 +01:00
|
|
|
|
2016-09-28 05:32:15 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "IJHack";
|
2016-10-10 12:20:51 +01:00
|
|
|
repo = "QtPass";
|
2016-09-28 05:32:15 +01:00
|
|
|
rev = "v${version}";
|
2019-10-23 20:24:27 +01:00
|
|
|
sha256 = "0748hjvhjrybi33ci3c8hcr74k9pdrf5jv8npf9hrsrmdyy1kr9x";
|
2015-06-25 14:37:15 +01:00
|
|
|
};
|
|
|
|
|
2019-11-30 11:20:35 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/qtpass.cpp \
|
|
|
|
--replace "/usr/bin/qrencode" "${qrencode}/bin/qrencode"
|
|
|
|
'';
|
|
|
|
|
2019-10-05 04:57:55 +01:00
|
|
|
buildInputs = [ git gnupg pass qtbase qtsvg ];
|
2016-04-25 11:12:05 +01:00
|
|
|
|
2019-10-05 04:57:55 +01:00
|
|
|
nativeBuildInputs = [ qmake qttools ];
|
2015-06-25 14:37:15 +01:00
|
|
|
|
2019-03-21 20:13:18 +00:00
|
|
|
enableParallelBuilding = true;
|
2015-06-25 14:37:15 +01:00
|
|
|
|
2019-12-20 21:31:29 +00:00
|
|
|
patches = [
|
|
|
|
# Fix path to pass-otp plugin `/usr/lib/password-store/extensions/otp.bash` being hardcoded.
|
|
|
|
# TODO: Remove when https://github.com/IJHack/QtPass/pull/499 is merged and available.
|
|
|
|
(fetchpatch {
|
|
|
|
name = "qtpass-Dont-hardcode-pass-otp-usr-lib-path.patch";
|
|
|
|
url = "https://github.com/IJHack/QtPass/commit/2ca9f0ec5a8d709c97a2433c5cd814040c82d4f3.patch";
|
|
|
|
sha256 = "0ljlvqxvarrz2a4j71i66aflrxi84zirb6cg9kvygnvhvm1zbc7d";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-10-05 04:57:55 +01:00
|
|
|
qmakeFlags = [
|
|
|
|
# setup hook only sets QMAKE_LRELEASE, set QMAKE_LUPDATE too:
|
|
|
|
"QMAKE_LUPDATE=${qttools.dev}/bin/lupdate"
|
|
|
|
];
|
|
|
|
|
2019-08-08 11:15:50 +01:00
|
|
|
qtWrapperArgs = [
|
2019-10-05 05:08:51 +01:00
|
|
|
"--suffix PATH : ${lib.makeBinPath [ git gnupg pass pwgen ]}"
|
2019-08-08 11:15:50 +01:00
|
|
|
];
|
|
|
|
|
2016-04-25 11:12:05 +01:00
|
|
|
postInstall = ''
|
2019-10-05 05:04:16 +01:00
|
|
|
install -D qtpass.desktop -t $out/share/applications
|
2018-01-05 01:45:50 +00:00
|
|
|
install -D artwork/icon.svg $out/share/icons/hicolor/scalable/apps/qtpass-icon.svg
|
2019-10-05 05:04:16 +01:00
|
|
|
install -D qtpass.1 -t $out/share/man/man1
|
2015-06-25 14:37:15 +01:00
|
|
|
'';
|
|
|
|
|
2019-10-05 04:57:55 +01:00
|
|
|
meta = with lib; {
|
2015-06-25 14:37:15 +01:00
|
|
|
description = "A multi-platform GUI for pass, the standard unix password manager";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://qtpass.org";
|
2015-06-25 14:37:15 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.hrdinka ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|