2022-11-27 09:42:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, testers
|
|
|
|
, zlint
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "zlint";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "3.5.0";
|
2022-11-27 09:42:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zmap";
|
|
|
|
repo = "zlint";
|
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-PpCA7BeamXWWRIXcoIGg2gufpqrzI6goXxQhJaH04cA=";
|
2022-11-27 09:42:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
modRoot = "v3";
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
vendorHash = "sha256-MDg09cjJ/vSLjXm4l5S4v/r2YQPV4enH8V3ByBtDVfM=";
|
2022-11-27 09:42:12 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Remove a package which is not declared in go.mod.
|
|
|
|
rm -rf v3/cmd/genTestCerts
|
|
|
|
'';
|
|
|
|
|
|
|
|
excludedPackages = [
|
|
|
|
"lints"
|
|
|
|
];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = zlint;
|
|
|
|
command = "zlint -version";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "X.509 Certificate Linter focused on Web PKI standards and requirements";
|
|
|
|
longDescription = ''
|
|
|
|
ZLint is a X.509 certificate linter written in Go that checks for
|
|
|
|
consistency with standards (e.g. RFC 5280) and other relevant PKI
|
|
|
|
requirements (e.g. CA/Browser Forum Baseline Requirements).
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/zmap/zlint";
|
|
|
|
changelog = "https://github.com/zmap/zlint/releases/tag/${src.rev}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ baloo ];
|
|
|
|
};
|
|
|
|
}
|