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

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

42 lines
962 B
Nix
Raw Normal View History

2022-06-25 16:59:41 +02:00
{ lib
, makeWrapper
, buildGoModule
, fetchFromGitHub
, gopass
}:
buildGoModule rec {
pname = "gopass-hibp";
version = "1.15.7";
2022-06-25 16:59:41 +02:00
src = fetchFromGitHub {
owner = "gopasspw";
2023-02-13 20:51:51 +01:00
repo = "gopass-hibp";
2022-06-25 16:59:41 +02:00
rev = "v${version}";
hash = "sha256-525e2LXQ/Ldrqhxqndwpdo2HeS4xRkbPzfwvWeiEayE=";
2022-06-25 16:59:41 +02:00
};
vendorHash = "sha256-jfqxl21euOtOvt+RltVlSjca2o8VuLtWHgpnW4ve5JM=";
2022-06-25 16:59:41 +02:00
subPackages = [ "." ];
nativeBuildInputs = [ makeWrapper ];
ldflags = [
"-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}"
];
postFixup = ''
2022-09-21 06:24:02 +02:00
wrapProgram $out/bin/gopass-hibp \
--prefix PATH : "${lib.makeBinPath [ gopass ]}"
2022-06-25 16:59:41 +02: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 16:59:41 +02:00
license = licenses.mit;
maintainers = with maintainers; [ sikmir ];
};
}