From f0636c21e0593be735e117332b4ecb1ed3c52c9b Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 6 Jul 2021 04:20:00 +0000 Subject: [PATCH] yubikey-agent: 2021-02-18 -> 0.1.4 --- pkgs/tools/security/yubikey-agent/default.nix | 19 +++++----------- .../yubikey-agent/use-piv-go-75.patch | 22 ------------------- 2 files changed, 5 insertions(+), 36 deletions(-) delete mode 100644 pkgs/tools/security/yubikey-agent/use-piv-go-75.patch diff --git a/pkgs/tools/security/yubikey-agent/default.nix b/pkgs/tools/security/yubikey-agent/default.nix index 305f5a4fe79..baccb14faf4 100644 --- a/pkgs/tools/security/yubikey-agent/default.nix +++ b/pkgs/tools/security/yubikey-agent/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "yubikey-agent"; - version = "unstable-2021-02-18"; + version = "0.1.4"; src = fetchFromGitHub { owner = "FiloSottile"; repo = pname; - rev = "8cadc13d107757f8084d9d2b93ea64ff0c1748e8"; - sha256 = "1lklgq9qkqil5s0g56wbhs0vpr9c1bd4ir7bkrjwqj75ygxim8ml"; + rev = "v${version}"; + sha256 = "1b4522s7xkh6q74m0lprbnzg2hspg1pr9rzn94qmd06sry82d3fd"; }; buildInputs = @@ -17,15 +17,11 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper pkg-config ]; - # pull in go-piv/piv-go#75 - # once go-piv/piv-go#75 is merged and released, we should - # use the released version (and push upstream to do the same) - patches = [ ./use-piv-go-75.patch ]; postPatch = lib.optionalString stdenv.isLinux '' substituteInPlace main.go --replace 'notify-send' ${libnotify}/bin/notify-send ''; - vendorSha256 = "1zx1w2is61471v4dlmr4wf714zqsc8sppik671p7s4fis5vccsca"; + vendorSha256 = "0cpj4nj2g0ick6p79h4pnjg7ybnyz9p26jivv0awi6bmn378nbxn"; doCheck = false; @@ -35,12 +31,7 @@ buildGoModule rec { # ensure the nixpkgs-provided one is available postInstall = lib.optionalString stdenv.isDarwin '' wrapProgram $out/bin/yubikey-agent --suffix PATH : $(dirname ${pinentry_mac}/${pinentry_mac.binaryPath}) - '' - # Note: in the next release, upstream provides - # contrib/systemd/user/yubikey-agent.service, which we should use - # instead - # See https://github.com/FiloSottile/yubikey-agent/pull/43 - + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.isLinux '' mkdir -p $out/lib/systemd/user substitute contrib/systemd/user/yubikey-agent.service $out/lib/systemd/user/yubikey-agent.service \ --replace 'ExecStart=yubikey-agent' "ExecStart=$out/bin/yubikey-agent" diff --git a/pkgs/tools/security/yubikey-agent/use-piv-go-75.patch b/pkgs/tools/security/yubikey-agent/use-piv-go-75.patch deleted file mode 100644 index 73967d817d9..00000000000 --- a/pkgs/tools/security/yubikey-agent/use-piv-go-75.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 547695fff9cbfc4037168cdeb07cfe16bd89b6db Mon Sep 17 00:00:00 2001 -From: Philip Potter -Date: Sat, 25 Jul 2020 21:59:50 +0100 -Subject: [PATCH] Pull in piv-go#75 - ---- - go.mod | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/go.mod b/go.mod -index d4d13c8..f75be2d 100644 ---- a/go.mod -+++ b/go.mod -@@ -7,3 +7,5 @@ require ( - github.com/gopasspw/gopass v1.9.1 - golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79 - ) -+ -+replace github.com/go-piv/piv-go => github.com/rawkode/piv-go v1.5.1-0.20200725154545-1c3200c75a28 --- -2.27.0 -