Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

88 lines
1.7 KiB
Nix

{
fetchFromGitHub,
lib,
stdenv,
git,
gnupg,
pass,
pwgen,
qrencode,
qtbase,
qtsvg,
qttools,
qmake,
wrapQtAppsHook,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "qtpass";
version = "1.4.0";
src = fetchFromGitHub {
owner = "IJHack";
repo = "QtPass";
rev = "v${version}";
sha256 = "sha256-oKLLmsuXD2Hb2LQ4tcJP2gpR6eLaM/JzDhRcRSpUPYI=";
};
postPatch = ''
substituteInPlace src/qtpass.cpp \
--replace "/usr/bin/qrencode" "${qrencode}/bin/qrencode"
'';
buildInputs = [
git
gnupg
pass
qtbase
qtsvg
];
nativeBuildInputs = [
qmake
qttools
wrapQtAppsHook
makeWrapper
];
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
]
}"
];
installPhase = lib.optionalString stdenv.hostPlatform.isDarwin ''
runHook preInstall
mkdir -p $out/Applications
cp -r main/QtPass.app $out/Applications
makeWrapper $out/Applications/QtPass.app/Contents/MacOS/QtPass $out/bin/qtpass
runHook postInstall
'';
postInstall = ''
install -D qtpass.desktop -t $out/share/applications
install -D artwork/icon.svg $out/share/icons/hicolor/scalable/apps/qtpass-icon.svg
install -D qtpass.1 -t $out/share/man/man1
'';
meta = with lib; {
description = "Multi-platform GUI for pass, the standard unix password manager";
mainProgram = "qtpass";
homepage = "https://qtpass.org";
license = licenses.gpl3;
maintainers = [ maintainers.hrdinka ];
platforms = platforms.all;
};
}