summary refs log tree commit diff
path: root/pkgs/tools/misc/tfk8s/default.nix
diff options
context:
space:
mode:
authorsuperherointj <5861043+superherointj@users.noreply.github.com>2021-03-12 08:50:03 -0300
committersuperherointj <5861043+superherointj@users.noreply.github.com>2021-03-12 08:50:03 -0300
commitc870a98ba32cd17cb1cb8e1deaa7c1b73cfd4f92 (patch)
tree3d5286d2eb1069cbf532051b64a0f5564c3e2c31 /pkgs/tools/misc/tfk8s/default.nix
parent163ffe2fe41b9b0c757733388761c713e9457f39 (diff)
downloadnixpkgs-c870a98ba32cd17cb1cb8e1deaa7c1b73cfd4f92.tar
nixpkgs-c870a98ba32cd17cb1cb8e1deaa7c1b73cfd4f92.tar.gz
nixpkgs-c870a98ba32cd17cb1cb8e1deaa7c1b73cfd4f92.tar.bz2
nixpkgs-c870a98ba32cd17cb1cb8e1deaa7c1b73cfd4f92.tar.lz
nixpkgs-c870a98ba32cd17cb1cb8e1deaa7c1b73cfd4f92.tar.xz
nixpkgs-c870a98ba32cd17cb1cb8e1deaa7c1b73cfd4f92.tar.zst
nixpkgs-c870a98ba32cd17cb1cb8e1deaa7c1b73cfd4f92.zip
tfk8s: init at 0.1.0
With contributions & review by @SuperSandro2000
Diffstat (limited to 'pkgs/tools/misc/tfk8s/default.nix')
-rw-r--r--pkgs/tools/misc/tfk8s/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/tools/misc/tfk8s/default.nix b/pkgs/tools/misc/tfk8s/default.nix
new file mode 100644
index 00000000000..b1e75f36b54
--- /dev/null
+++ b/pkgs/tools/misc/tfk8s/default.nix
@@ -0,0 +1,38 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "tfk8s";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "jrhouston";
+    repo = "tfk8s";
+    rev = version;
+    sha256 = "sha256-JzTWbkICOIfsHgMvpXz4bIWaXKKDAD8INSorMvnXiBw=";
+  };
+
+  vendorSha256 = "sha256-r0c3y+nRc/hCTAT31DasQjxZN86BT8jnJmsLM7Ugrq4=";
+  runVend = true;
+
+  buildFlagsArray = [
+    "-ldflags="
+    "-s"
+    "-w"
+    "-X main.toolVersion=${version}"
+    "-X main.builtBy=nixpkgs"
+  ];
+
+  meta = with lib; {
+    description = "An utility to convert Kubernetes YAML manifests to Terraform's HCL format.";
+    license = licenses.mit;
+    longDescription = ''
+      tfk8s is a tool that makes it easier to work with the Terraform Kubernetes Provider.
+      If you want to copy examples from the Kubernetes documentation or migrate existing YAML manifests and use them with Terraform without having to convert YAML to HCL by hand, this tool is for you.
+      Features:
+      * Convert a YAML file containing multiple manifests.
+      * Strip out server side fields when piping kubectl get $R -o yaml | tfk8s --strip
+    '';
+    homepage = "https://github.com/jrhouston/tfk8s/";
+    maintainers = with maintainers; [ superherointj ];
+  };
+}