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

40 lines
844 B
Nix
Raw Normal View History

{ lib
, makeWrapper
, buildGoModule
, fetchFromGitHub
, gopass
}:
buildGoModule rec {
pname = "gopass-hibp";
version = "1.14.6";
src = fetchFromGitHub {
owner = "gopasspw";
repo = pname;
rev = "v${version}";
sha256 = "sha256-BVL6gLaZmGFa72gpfYFs2U6gVJL7LgoxyAs16vk13Rc=";
};
vendorSha256 = "sha256-ouFZlZaJhlgCIanWgpzlXEKr9ua/wa7exk7QTNpxAaM=";
subPackages = [ "." ];
nativeBuildInputs = [ makeWrapper ];
ldflags = [
"-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}"
];
postFixup = ''
wrapProgram $out/bin/gopass-hibp --prefix PATH : "${lib.makeBinPath [ gopass ]}"
'';
meta = with lib; {
description = "Gopass haveibeenpwnd.com integration";
homepage = "https://www.gopass.pw/";
license = licenses.mit;
maintainers = with maintainers; [ sikmir ];
};
}