mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
passphrase2pgp: 1.2.1 -> 1.3.0, add check (#223114)
* passphrase2pgp: enable automatic update script * passphrase2pgp: 1.2.1 → 1.3.0 * passphrase2pgp: check that output key is stable across version --------- Co-authored-by: Dmitry Bogatov <serenity@kaction.cc>
This commit is contained in:
parent
1361910a4d
commit
86a60d7f4b
@ -1,14 +1,14 @@
|
|||||||
{ lib, buildGoModule, fetchFromGitHub }:
|
{ lib, buildGoModule, fetchFromGitHub, nix-update-script }:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "passphrase2pgp";
|
pname = "passphrase2pgp";
|
||||||
version = "1.2.1";
|
version = "1.3.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "skeeto";
|
owner = "skeeto";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-Ik/W3gGvrOyUvYgMYqT8FIFoxp62BXd2GpV14pYXEuY=";
|
hash = "sha256-it1XYzLiteL0oq4SZp5E3s6oSkFKi3ZY0Lt+P0gmNag=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "sha256-2H9YRVCaari47ppSkcQYg/P4Dzb4k5PLjKAtfp39NR8=";
|
vendorSha256 = "sha256-2H9YRVCaari47ppSkcQYg/P4Dzb4k5PLjKAtfp39NR8=";
|
||||||
@ -18,6 +18,16 @@ buildGoModule rec {
|
|||||||
cp README.md $out/share/doc/$name
|
cp README.md $out/share/doc/$name
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
output=$(echo NONE | ../go/bin/passphrase2pgp -a -u NONE -i /dev/stdin | sha256sum)
|
||||||
|
if [[ "$output" != "23f59f4346f35e2feca6ef703ea64973524dec365ea672f23e7afe79be1049dd -" ]] ; then
|
||||||
|
echo "passphrase2pgp introduced backward-incompatible change"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.updateScript = nix-update-script { };
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Predictable, passphrase-based PGP key generator";
|
description = "Predictable, passphrase-based PGP key generator";
|
||||||
homepage = "https://github.com/skeeto/passphrase2pgp";
|
homepage = "https://github.com/skeeto/passphrase2pgp";
|
||||||
|
Loading…
Reference in New Issue
Block a user