Unverified Commit 5fb785fb authored by Zexin Yuan's avatar Zexin Yuan
Browse files

gopass-summon-provider: remove dependency on gopass, add version check

parent 301f6534
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@
  fetchFromGitHub,
  makeWrapper,
  gopass,
  versionCheckHook,
  writableTmpDirAsHomeHook,
}:

buildGoModule (finalAttrs: {
@@ -32,7 +34,18 @@ buildGoModule (finalAttrs: {

  postFixup = ''
    wrapProgram $out/bin/gopass-summon-provider \
      --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"
  '';

  meta = {