diff options
Diffstat (limited to 'pkgs/applications/networking/cluster/yor/default.nix')
-rw-r--r-- | pkgs/applications/networking/cluster/yor/default.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/applications/networking/cluster/yor/default.nix b/pkgs/applications/networking/cluster/yor/default.nix new file mode 100644 index 000000000000..48cb8bd90053 --- /dev/null +++ b/pkgs/applications/networking/cluster/yor/default.nix @@ -0,0 +1,42 @@ +{ buildGoModule +, fetchFromGitHub +, lib +}: + +buildGoModule rec { + pname = "yor"; + version = "0.1.180"; + + src = fetchFromGitHub { + owner = "bridgecrewio"; + repo = pname; + rev = version; + hash = "sha256-m6MEVPF+Jug655ictoUI3KjpMX5w3A3aDhFDZXTQfi4="; + }; + + vendorHash = "sha256-ZeTjGmlu8LndD2DKNncPzlpECdvkOjfwaVvV6S3sL9E="; + + doCheck = false; + + # https://github.com/bridgecrewio/yor/blob/main/set-version.sh + preBuild = '' + cat << EOF > src/common/version.go + package common + + const Version = "${version}" + EOF + ''; + + ldflags = [ + "-s" + "-w" + ]; + + meta = with lib; { + description = "Extensible auto-tagger for your IaC files. The ultimate way to link entities in the cloud back to the codified resource which created it."; + homepage = "https://github.com/bridgecrewio/yor"; + changelog = "https://github.com/bridgecrewio/yor/releases/tag/${version}"; + license = licenses.asl20; + maintainers = [ maintainers.ivankovnatsky ]; + }; +} |