about summary refs log tree commit diff
path: root/pkgs/aszlig
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2021-01-27 21:31:58 +0100
committeraszlig <aszlig@nix.build>2021-01-27 21:46:30 +0100
commite96877eb761375075c138085c99d36b7f336d274 (patch)
tree79825918b818f35d81fba5849e8efcf64494d7e5 /pkgs/aszlig
parent912eaa63eacb57de33af76c8689dcffcca1ce349 (diff)
Revert "aszlig/gopass: Downgrade to version 1.9.2"
This reverts commit 7b8164be35c9d82d6e7389a407150a9128f7fb0c.

From the upstream changelog:

> This is an important bugfix release that should resolve several
> outstanding issues and concerns. Since 1.10.0 was released was engaged
> in a lot of discussions and realized that compatibility is more
> important than we first thought. So we're rolling back some breaking
> changes and revise some parts of our roadmap. We will strive to remain
> compatible with other password store implementations - but remember
> this is a goal, not a promise. This means we'll continue using
> compatible secrets formats as well as GPG and Git.

As mentioned in the original commit, I'm still not entirely convinced
that my use case has a future with gopass, their decision to roll back
some of the breaking changes at least makes it possible for me to
upgrade to the latest upstream version without the fear of being locked
in into some gopass-specific format.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/aszlig')
-rw-r--r--pkgs/aszlig/gopass/default.nix43
-rw-r--r--pkgs/aszlig/gopass/use-color-in-pager.patch14
2 files changed, 12 insertions, 45 deletions
diff --git a/pkgs/aszlig/gopass/default.nix b/pkgs/aszlig/gopass/default.nix
index c49aa503..1120933b 100644
--- a/pkgs/aszlig/gopass/default.nix
+++ b/pkgs/aszlig/gopass/default.nix
@@ -1,40 +1,7 @@
-{ lib, buildGoModule, fetchFromGitHub, installShellFiles, makeWrapper
-, git, gnupg, xclip, wl-clipboard
+{ gopass }:
 
-, gopass
-}:
-
-assert lib.versionOlder gopass.version "1.10.2";
-
-buildGoModule rec {
-  pname = "gopass";
-  version = "1.9.2";
-
-  src = fetchFromGitHub {
-    owner = "gopasspw";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "066dphw8xq0g72kj64sdai2yyllnr6ca27bfy5sxhk8x69j97rvz";
-  };
-
-  patches = [ ./use-color-in-pager.patch ];
-  vendorSha256 = "1wn20bh7ma4pblsf6qnlbz5bx4p9apig3d1yz7cpsqv4z3w07baw";
-  nativeBuildInputs = [ installShellFiles makeWrapper ];
-  doCheck = false;
-
-  buildFlagsArray = [
-    "-ldflags=-s -w -X main.version=${version} -X main.commit=${src.rev}"
+gopass.overrideAttrs (drv: {
+  patches = [
+    ./use-color-in-pager.patch
   ];
-
-  postInstall = ''
-    for shell in bash fish zsh; do
-      $out/bin/gopass completion "$shell" > "gopass.$shell"
-      installShellCompletion "gopass.$shell"
-    done
-  '';
-
-  postFixup = let
-    wrapperPath = lib.makeBinPath [ git gnupg xclip wl-clipboard ];
-    extraPath = lib.escapeShellArg wrapperPath;
-  in "wrapProgram \"$out/bin/gopass\" --prefix PATH : ${extraPath}";
-}
+})
diff --git a/pkgs/aszlig/gopass/use-color-in-pager.patch b/pkgs/aszlig/gopass/use-color-in-pager.patch
index 548e317c..b4d132d6 100644
--- a/pkgs/aszlig/gopass/use-color-in-pager.patch
+++ b/pkgs/aszlig/gopass/use-color-in-pager.patch
@@ -1,16 +1,16 @@
-diff --git a/pkg/action/list.go b/pkg/action/list.go
-index 8a96407..45b416e 100644
---- a/pkg/action/list.go
-+++ b/pkg/action/list.go
+diff --git a/internal/action/list.go b/internal/action/list.go
+index 05fb5155..7e70ffc2 100644
+--- a/internal/action/list.go
++++ b/internal/action/list.go
 @@ -9,7 +9,6 @@ import (
  	"os/exec"
  	"strings"
  
 -	"github.com/fatih/color"
+ 	"github.com/gopasspw/gopass/internal/tree"
  	"github.com/gopasspw/gopass/pkg/ctxutil"
- 	"github.com/gopasspw/gopass/pkg/termutil"
- 	"github.com/gopasspw/gopass/pkg/tree"
-@@ -115,7 +114,6 @@ func redirectPager(ctx context.Context, subtree tree.Tree) (io.Writer, *bytes.Bu
+ 	"golang.org/x/crypto/ssh/terminal"
+@@ -111,7 +110,6 @@ func redirectPager(ctx context.Context, subtree *tree.Root) (io.Writer, *bytes.B
  	if pager := os.Getenv("PAGER"); pager == "" {
  		return stdout, nil
  	}