mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-08 05:54:24 +00:00
571c71e6f7
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.
54 lines
1.3 KiB
Nix
54 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
kics,
|
|
testers,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "kics";
|
|
version = "2.1.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Checkmarx";
|
|
repo = "kics";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-/trhDDY2jyN0o92fjy/ScEbYpcuBPPIaHx+wNW3cWA0=";
|
|
};
|
|
|
|
vendorHash = "sha256-coX8BenRrGijErDNheD9+vZLOKzMXkcwhIa3BuxrOCM=";
|
|
|
|
subPackages = [ "cmd/console" ];
|
|
|
|
postInstall = ''
|
|
mv $out/bin/console $out/bin/kics
|
|
'';
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=github.com/Checkmarx/kics/v2/internal/constants.SCMCommit=${version}"
|
|
"-X=github.com/Checkmarx/kics/v2/internal/constants.Version=${version}"
|
|
];
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = kics;
|
|
command = "kics version";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Tool to check for vulnerabilities and other issues";
|
|
longDescription = ''
|
|
Find security vulnerabilities, compliance issues, and
|
|
infrastructure misconfigurations early in the development
|
|
cycle of your infrastructure-as-code.
|
|
'';
|
|
homepage = "https://github.com/Checkmarx/kics";
|
|
changelog = "https://github.com/Checkmarx/kics/releases/tag/v${version}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ patryk4815 ];
|
|
mainProgram = "kics";
|
|
};
|
|
}
|