2022-11-18 04:59:43 +01:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, testers
|
|
|
|
, zlint
|
|
|
|
}:
|
2022-11-16 19:56:45 +01:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "zlint";
|
|
|
|
version = "3.4.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zmap";
|
2022-11-18 04:59:43 +01:00
|
|
|
repo = "zlint";
|
2022-11-16 19:56:45 +01:00
|
|
|
rev = "v${version}";
|
2022-11-18 17:57:05 +01:00
|
|
|
hash = "sha256-l39GdfEKUAw5DQNjx6ZBgfGtengRlUUasm0G07kAA2A=";
|
2022-11-16 19:56:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
modRoot = "v3";
|
2022-11-18 04:59:43 +01:00
|
|
|
|
2022-11-16 19:56:45 +01:00
|
|
|
vendorHash = "sha256-OiHEyMHuSiWDB/1YRvAhErb1h/rFfXXVcagcP386doc=";
|
2022-11-18 04:59:43 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Remove a package which is not declared in go.mod.
|
|
|
|
rm -rf v3/cmd/genTestCerts
|
|
|
|
'';
|
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"cmd/zlint"
|
|
|
|
"cmd/zlint-gtld-update"
|
|
|
|
];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.version=${version}"
|
|
|
|
];
|
|
|
|
|
2022-11-18 17:57:05 +01:00
|
|
|
# Checks rely on .git directory, leaveDotGit makes the source derivation flaky.
|
|
|
|
doCheck = false;
|
2022-11-16 19:56:45 +01:00
|
|
|
|
2022-11-18 04:59:43 +01:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = zlint;
|
|
|
|
command = "zlint -version";
|
|
|
|
};
|
2022-11-16 19:56:45 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-11-18 04:59:43 +01: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";
|
|
|
|
changelog = "https://github.com/zmap/zlint/releases/tag/${src.rev}";
|
2022-11-16 19:56:45 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ baloo ];
|
|
|
|
};
|
|
|
|
}
|