42 lines
995 B
Nix
42 lines
995 B
Nix
{ lib
|
|
, makeWrapper
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, gopass
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "gopass-hibp";
|
|
version = "1.15.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gopasspw";
|
|
repo = "gopass-hibp";
|
|
rev = "v${version}";
|
|
hash = "sha256-dNzvC+ubkZPHx40bVwFT2R7TMrPdeD5oJz0lAd0vtw0=";
|
|
};
|
|
|
|
vendorHash = "sha256-zaB8xrzqk3moR/ScXdHtqIgA9lZqWFzLWi4NAqbs0XU=";
|
|
|
|
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://github.com/gopasspw/gopass-hibp";
|
|
changelog = "https://github.com/gopasspw/gopass-hibp/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ sikmir ];
|
|
mainProgram = "gopass-hibp";
|
|
};
|
|
}
|