nixpkgs/pkgs/applications/misc/qtpass/default.nix

50 lines
1.3 KiB
Nix
Raw Normal View History

{ fetchFromGitHub, lib, stdenv
2019-11-30 14:20:35 +03:00
, git, gnupg, pass, pwgen, qrencode
, qtbase, qtsvg, qttools, qmake, wrapQtAppsHook
}:
2015-06-25 16:37:15 +03:00
stdenv.mkDerivation rec {
pname = "qtpass";
version = "1.4.0";
2015-06-25 16:37:15 +03:00
2016-09-28 07:32:15 +03:00
src = fetchFromGitHub {
owner = "IJHack";
repo = "QtPass";
rev = "v${version}";
sha256 = "sha256-oKLLmsuXD2Hb2LQ4tcJP2gpR6eLaM/JzDhRcRSpUPYI=";
2015-06-25 16:37:15 +03:00
};
2019-11-30 14:20:35 +03:00
postPatch = ''
substituteInPlace src/qtpass.cpp \
--replace "/usr/bin/qrencode" "${qrencode}/bin/qrencode"
'';
2019-10-05 06:57:55 +03:00
buildInputs = [ git gnupg pass qtbase qtsvg ];
nativeBuildInputs = [ qmake qttools wrapQtAppsHook ];
2019-10-05 06:57:55 +03:00
qmakeFlags = [
# setup hook only sets QMAKE_LRELEASE, set QMAKE_LUPDATE too:
"QMAKE_LUPDATE=${qttools.dev}/bin/lupdate"
];
qtWrapperArgs = [
"--suffix PATH : ${lib.makeBinPath [ git gnupg pass pwgen ]}"
];
postInstall = ''
2019-10-05 07:04:16 +03:00
install -D qtpass.desktop -t $out/share/applications
2018-01-05 04:45:50 +03:00
install -D artwork/icon.svg $out/share/icons/hicolor/scalable/apps/qtpass-icon.svg
2019-10-05 07:04:16 +03:00
install -D qtpass.1 -t $out/share/man/man1
2015-06-25 16:37:15 +03:00
'';
2019-10-05 06:57:55 +03:00
meta = with lib; {
description = "Multi-platform GUI for pass, the standard unix password manager";
mainProgram = "qtpass";
homepage = "https://qtpass.org";
2015-06-25 16:37:15 +03:00
license = licenses.gpl3;
maintainers = [ maintainers.hrdinka ];
platforms = platforms.all;
};
}