nixpkgs/pkgs/tools/security/gopass/hibp.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
995 B
Nix
Raw Normal View History

2022-06-25 14:59:41 +00:00
{ lib
, makeWrapper
, buildGoModule
, fetchFromGitHub
, gopass
}:
buildGoModule rec {
pname = "gopass-hibp";
version = "1.15.8";
2022-06-25 14:59:41 +00:00
src = fetchFromGitHub {
owner = "gopasspw";
2023-02-13 19:51:51 +00:00
repo = "gopass-hibp";
2022-06-25 14:59:41 +00:00
rev = "v${version}";
hash = "sha256-dNzvC+ubkZPHx40bVwFT2R7TMrPdeD5oJz0lAd0vtw0=";
2022-06-25 14:59:41 +00:00
};
vendorHash = "sha256-zaB8xrzqk3moR/ScXdHtqIgA9lZqWFzLWi4NAqbs0XU=";
2022-06-25 14:59:41 +00:00
subPackages = [ "." ];
nativeBuildInputs = [ makeWrapper ];
ldflags = [
"-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}"
];
postFixup = ''
2022-09-21 04:24:02 +00:00
wrapProgram $out/bin/gopass-hibp \
--prefix PATH : "${lib.makeBinPath [ gopass ]}"
2022-06-25 14:59:41 +00:00
'';
meta = with lib; {
description = "Gopass haveibeenpwnd.com integration";
homepage = "https://github.com/gopasspw/gopass-hibp";
changelog = "https://github.com/gopasspw/gopass-hibp/blob/v${version}/CHANGELOG.md";
2022-06-25 14:59:41 +00:00
license = licenses.mit;
maintainers = with maintainers; [ sikmir ];
2023-09-24 10:39:00 +00:00
mainProgram = "gopass-hibp";
2022-06-25 14:59:41 +00:00
};
}