From 47c8b8a8a4f1c568be4546dc689fa2e17cbca3fc Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Mon, 2 Dec 2024 11:38:09 +0900 Subject: [PATCH 1/4] gopass: format with nixfmt-rfc-style --- pkgs/tools/security/gopass/default.nix | 63 ++++++++++++++++---------- 1 file changed, 39 insertions(+), 24 deletions(-) diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index 68b794214f6ee..070aa5beebc88 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -1,21 +1,25 @@ -{ lib -, stdenv -, makeWrapper -, buildGoModule -, fetchFromGitHub -, installShellFiles -, git -, gnupg -, xclip -, wl-clipboard -, passAlias ? false +{ + lib, + stdenv, + makeWrapper, + buildGoModule, + fetchFromGitHub, + installShellFiles, + git, + gnupg, + xclip, + wl-clipboard, + passAlias ? false, }: buildGoModule rec { pname = "gopass"; version = "1.15.14"; - nativeBuildInputs = [ installShellFiles makeWrapper ]; + nativeBuildInputs = [ + installShellFiles + makeWrapper + ]; src = fetchFromGitHub { owner = "gopasspw"; @@ -28,25 +32,33 @@ buildGoModule rec { subPackages = [ "." ]; - ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}" ]; + ldflags = [ + "-s" + "-w" + "-X main.version=${version}" + "-X main.commit=${src.rev}" + ]; wrapperPath = lib.makeBinPath ( [ git gnupg xclip - ] ++ lib.optional stdenv.hostPlatform.isLinux wl-clipboard + ] + ++ lib.optional stdenv.hostPlatform.isLinux wl-clipboard ); - postInstall = '' - installManPage gopass.1 - installShellCompletion --cmd gopass \ - --zsh zsh.completion \ - --bash bash.completion \ - --fish fish.completion - '' + lib.optionalString passAlias '' - ln -s $out/bin/gopass $out/bin/pass - ''; + postInstall = + '' + installManPage gopass.1 + installShellCompletion --cmd gopass \ + --zsh zsh.completion \ + --bash bash.completion \ + --fish fish.completion + '' + + lib.optionalString passAlias '' + ln -s $out/bin/gopass $out/bin/pass + ''; postFixup = '' wrapProgram $out/bin/gopass \ @@ -61,7 +73,10 @@ buildGoModule rec { description = "Slightly more awesome Standard Unix Password Manager for Teams. Written in Go"; homepage = "https://www.gopass.pw/"; license = licenses.mit; - maintainers = with maintainers; [ rvolosatovs sikmir ]; + maintainers = with maintainers; [ + rvolosatovs + sikmir + ]; changelog = "https://github.com/gopasspw/gopass/blob/v${version}/CHANGELOG.md"; longDescription = '' From 8780e5fb89ad77fb99532ae898e2af0b57f6c21c Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Mon, 2 Dec 2024 11:38:56 +0900 Subject: [PATCH 2/4] gopass: add updateScript --- pkgs/tools/security/gopass/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index 070aa5beebc88..56281de02ee4e 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -10,6 +10,7 @@ xclip, wl-clipboard, passAlias ? false, + nix-update-script, }: buildGoModule rec { @@ -67,6 +68,8 @@ buildGoModule rec { ''; passthru = { inherit wrapperPath; + + updateScript = nix-update-script { }; }; meta = with lib; { From 1da2983cbd4baa81f5c7f7e89bd20a9a09b38691 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Mon, 2 Dec 2024 11:41:00 +0900 Subject: [PATCH 3/4] gopass: add passthru.tests.version --- pkgs/tools/security/gopass/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index 56281de02ee4e..e88eb4eb73985 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -10,7 +10,9 @@ xclip, wl-clipboard, passAlias ? false, + testers, nix-update-script, + gopass, }: buildGoModule rec { @@ -69,6 +71,10 @@ buildGoModule rec { passthru = { inherit wrapperPath; + tests.version = testers.testVersion { + package = gopass; + }; + updateScript = nix-update-script { }; }; From c3cc4cc013ecf2869e1a7ee7e071d48e2c98bf4b Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Mon, 2 Dec 2024 11:42:14 +0900 Subject: [PATCH 4/4] gopass: 1.15.14 -> 1.15.15 Release: https://github.com/gopasspw/gopass/releases/tag/v1.15.15 --- pkgs/tools/security/gopass/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index e88eb4eb73985..c24a3536179c6 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -10,6 +10,7 @@ xclip, wl-clipboard, passAlias ? false, + apple-sdk_14, testers, nix-update-script, gopass, @@ -17,21 +18,26 @@ buildGoModule rec { pname = "gopass"; - version = "1.15.14"; + version = "1.15.15"; nativeBuildInputs = [ installShellFiles makeWrapper ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ + # For ScreenCaptureKit.h, see https://github.com/NixOS/nixpkgs/pull/358760#discussion_r1858327365 + apple-sdk_14 + ]; + src = fetchFromGitHub { owner = "gopasspw"; repo = "gopass"; rev = "v${version}"; - hash = "sha256-3oXdHjW3svGfOEoikEeGm4oU9j+7IBOHw5KH7CCV/uw="; + hash = "sha256-GL0vnrNz9vcdybubYIjiK0tDH3L4lNWNo+rAAWv7d8o="; }; - vendorHash = "sha256-GeppWyIWE8kYIqhRf1iHksWksdjbIzy96rRpx+qQ3L0="; + vendorHash = "sha256-dDy7eQe/JtAsB+cPONiqUwcCsbisCLzY/5YQaH9w2Yg="; subPackages = [ "." ];