diff --git a/pkgs/by-name/go/gopass-jsonapi/package.nix b/pkgs/by-name/go/gopass-jsonapi/package.nix new file mode 100644 index 000000000000..5a3ad29f431d --- /dev/null +++ b/pkgs/by-name/go/gopass-jsonapi/package.nix @@ -0,0 +1,60 @@ +{ + lib, + stdenv, + makeWrapper, + buildGoModule, + fetchFromGitHub, + installShellFiles, + gopass, + apple-sdk_14, +}: + +buildGoModule rec { + pname = "gopass-jsonapi"; + version = "1.15.15"; + + src = fetchFromGitHub { + owner = "gopasspw"; + repo = "gopass-jsonapi"; + rev = "v${version}"; + hash = "sha256-nayg7NTJH6bAPiguyuN37JivfWkpOUX/xI/+PHDi3UI="; + }; + + vendorHash = "sha256-khX1CdzN+5T8q2hA3NyCxtz7uw9uDd9u61q3UslTtqs="; + + subPackages = [ "." ]; + + 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 + ]; + + ldflags = [ + "-s" + "-w" + "-X main.version=${version}" + "-X main.commit=${src.rev}" + ]; + + postFixup = '' + wrapProgram $out/bin/gopass-jsonapi \ + --prefix PATH : "${gopass.wrapperPath}" + ''; + + meta = { + description = "Enables communication with gopass via JSON messages"; + homepage = "https://github.com/gopasspw/gopass-jsonapi"; + changelog = "https://github.com/gopasspw/gopass-jsonapi/blob/v${version}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + maxhbr + doronbehar + ]; + mainProgram = "gopass-jsonapi"; + }; +} diff --git a/pkgs/tools/security/gopass/jsonapi.nix b/pkgs/tools/security/gopass/jsonapi.nix deleted file mode 100644 index 1c9abd08c80a..000000000000 --- a/pkgs/tools/security/gopass/jsonapi.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ lib -, makeWrapper -, buildGoModule -, fetchFromGitHub -, installShellFiles -, gopass -}: - -buildGoModule rec { - pname = "gopass-jsonapi"; - version = "1.15.14"; - - src = fetchFromGitHub { - owner = "gopasspw"; - repo = "gopass-jsonapi"; - rev = "v${version}"; - hash = "sha256-DbfmjgIUqgWVYyPqkcaeE5JKzqElNbrGnx62Fd8v7Hg="; - }; - - vendorHash = "sha256-Aahu0afi6bPnvz/NSZznbp0y9vMJWDj1Bq7tWGRmm7g="; - - subPackages = [ "." ]; - - nativeBuildInputs = [ installShellFiles makeWrapper ]; - - ldflags = [ - "-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}" - ]; - - postFixup = '' - wrapProgram $out/bin/gopass-jsonapi \ - --prefix PATH : "${gopass.wrapperPath}" - ''; - - meta = with lib; { - description = "Enables communication with gopass via JSON messages"; - homepage = "https://github.com/gopasspw/gopass-jsonapi"; - changelog = "https://github.com/gopasspw/gopass-jsonapi/blob/v${version}/CHANGELOG.md"; - license = licenses.mit; - maintainers = with maintainers; [ maxhbr ]; - mainProgram = "gopass-jsonapi"; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0bdc482524af..4b6419813241 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1901,8 +1901,6 @@ with pkgs; gopass-hibp = callPackage ../tools/security/gopass/hibp.nix { }; - gopass-jsonapi = callPackage ../tools/security/gopass/jsonapi.nix { }; - git-credential-gopass = callPackage ../tools/security/gopass/git-credential.nix { }; gopass-summon-provider = callPackage ../tools/security/gopass/summon.nix { };