about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/yor
diff options
context:
space:
mode:
authorIvan Kovnatsky <75213+ivankovnatsky@users.noreply.github.com>2023-05-23 15:27:31 +0300
committerIvan Kovnatsky <75213+ivankovnatsky@users.noreply.github.com>2023-05-30 21:57:21 +0300
commit664f51821a848adc812ac110a4fe03c5681ae4ac (patch)
tree1e7bec73d8f482302d0bdf3d099b5b3fc3472180 /pkgs/applications/networking/cluster/yor
parent93581dbb574af0b5142638a559aa66db1ddc4042 (diff)
yor: init at 0.1.177
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/applications/networking/cluster/yor')
-rw-r--r--pkgs/applications/networking/cluster/yor/default.nix42
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 0000000000000..ae5e64e2fe094
--- /dev/null
+++ b/pkgs/applications/networking/cluster/yor/default.nix
@@ -0,0 +1,42 @@
+{ buildGoModule
+, fetchFromGitHub
+, lib
+}:
+
+buildGoModule rec {
+  pname = "yor";
+  version = "0.1.177";
+
+  src = fetchFromGitHub {
+    owner = "bridgecrewio";
+    repo = pname;
+    rev = version;
+    hash = "sha256-tOYRd3LxSlAvXCW89LAm4GWWukDBZhsgYIWYlEVKokE=";
+  };
+
+  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 ];
+  };
+}