2022-11-18 03:59:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, testers
|
|
|
|
, zlint
|
|
|
|
}:
|
2022-11-16 18:56:45 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "zlint";
|
2024-08-04 16:59:49 +00:00
|
|
|
version = "3.6.3";
|
2022-11-16 18:56:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zmap";
|
2022-11-18 03:59:43 +00:00
|
|
|
repo = "zlint";
|
2024-08-04 20:16:09 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-08-04 16:59:49 +00:00
|
|
|
hash = "sha256-N199sSxe06nm0CInTYAuwRgoq7hN7IQpHz5ERUSpk3M=";
|
2022-11-16 18:56:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
modRoot = "v3";
|
2022-11-18 03:59:43 +00:00
|
|
|
|
2024-08-04 16:59:49 +00:00
|
|
|
vendorHash = "sha256-RX7B9RyNmEO9grMR9Mqn1jXDH5sgT0QDvdhXgY1HYtQ=";
|
2022-11-18 03:59:43 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Remove a package which is not declared in go.mod.
|
|
|
|
rm -rf v3/cmd/genTestCerts
|
|
|
|
'';
|
|
|
|
|
2022-11-23 20:56:30 +00:00
|
|
|
excludedPackages = [
|
|
|
|
"lints"
|
2022-11-18 03:59:43 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
2024-08-04 20:16:09 +00:00
|
|
|
"-X=main.version=${version}"
|
2022-11-18 03:59:43 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = zlint;
|
|
|
|
command = "zlint -version";
|
|
|
|
};
|
2022-11-16 18:56:45 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-11-18 03:59:43 +00:00
|
|
|
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";
|
2024-08-30 02:43:47 +00:00
|
|
|
changelog = "https://github.com/zmap/zlint/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
|
2022-11-16 18:56:45 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ baloo ];
|
|
|
|
};
|
|
|
|
}
|