gopass-hibp: remove dependency on gopass, add version check

This commit is contained in:
Zexin Yuan
2025-12-16 10:24:32 +08:00
parent 25914763dc
commit b6638b48e9
+14 -1
View File
@@ -4,6 +4,8 @@
fetchFromGitHub,
makeWrapper,
gopass,
versionCheckHook,
writableTmpDirAsHomeHook,
}:
buildGoModule (finalAttrs: {
@@ -32,7 +34,18 @@ buildGoModule (finalAttrs: {
postFixup = ''
wrapProgram $out/bin/gopass-hibp \
--prefix PATH : "${lib.makeBinPath [ gopass ]}"
--prefix PATH : "${gopass.wrapperPath}"
'';
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
writableTmpDirAsHomeHook
gopass
];
versionCheckKeepEnvironment = [ "HOME" ];
preVersionCheck = ''
gopass setup --name "user" --email "user@localhost"
'';
__darwinAllowLocalNetworking = true;