nixpkgs/pkgs/by-name/zl/zlint/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

56 lines
1.3 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, testers
, zlint
}:
buildGoModule rec {
pname = "zlint";
version = "3.6.4";
src = fetchFromGitHub {
owner = "zmap";
repo = "zlint";
rev = "refs/tags/v${version}";
hash = "sha256-FFgBRuNvm4Cnjls9y+L256vMGGNu10x7Vh+V9HBon70=";
};
modRoot = "v3";
vendorHash = "sha256-RX7B9RyNmEO9grMR9Mqn1jXDH5sgT0QDvdhXgY1HYtQ=";
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/${lib.removePrefix "refs/tags/" src.rev}";
license = licenses.asl20;
maintainers = with maintainers; [ baloo ];
};
}