mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
gopass-jsonapi: add version check
This commit is contained in:
@@ -4,9 +4,11 @@
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
writableTmpDirAsHomeHook,
|
||||
jq,
|
||||
gnupg,
|
||||
gopass,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -39,6 +41,7 @@ buildGoModule (finalAttrs: {
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
makeWrapper
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
ldflags = [
|
||||
@@ -50,7 +53,6 @@ buildGoModule (finalAttrs: {
|
||||
|
||||
postInstall = ''
|
||||
# Generate native messaging manifests for Chrome and Firefox.
|
||||
export HOME=$(mktemp -d)
|
||||
${gnupg}/bin/gpg --batch --passphrase "" --quick-generate-key "user <user@localhost>"
|
||||
${gopass}/bin/gopass setup --name "user" --email "user@localhost"
|
||||
|
||||
@@ -93,6 +95,12 @@ buildGoModule (finalAttrs: {
|
||||
--prefix PATH : "${gopass.wrapperPath}"
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
versionCheckKeepEnvironment = [ "HOME" ];
|
||||
|
||||
meta = {
|
||||
description = "Enables communication with gopass via JSON messages";
|
||||
homepage = "https://github.com/gopasspw/gopass-jsonapi";
|
||||
|
||||
Reference in New Issue
Block a user