diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
commit | 62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch) | |
tree | c2630f69080637987b68acb1ee8676d2681fe304 /pkgs/tools/misc/tfk8s/default.nix | |
parent | d9c82ed3044c72cecf01c6ea042489d30914577c (diff) | |
parent | e24069138dfec3ef94f211f1da005bb5395adc11 (diff) | |
download | nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2 nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip |
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/tools/misc/tfk8s/default.nix')
-rw-r--r-- | pkgs/tools/misc/tfk8s/default.nix | 50 |
1 files changed, 50 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..d9c9ad0451b --- /dev/null +++ b/pkgs/tools/misc/tfk8s/default.nix @@ -0,0 +1,50 @@ +{ lib, buildGoModule, fetchFromGitHub, callPackage }: + +buildGoModule rec { + pname = "tfk8s"; + version = "0.1.5"; + tag = "v${version}"; + + src = fetchFromGitHub { + owner = "jrhouston"; + repo = "tfk8s"; + rev = tag; + sha256 = "sha256-T0zM2JOmzk8YyS3+De6yGwiwLgyb6Rwy6hT9b44wNxQ="; + }; + + vendorSha256 = "sha256-eLPmghs05pMMtys97Ja7YGdVMZmMmiaFeMwzaWNxW0I="; + runVend = true; + + buildFlagsArray = [ + "-ldflags=" + "-s" + "-w" + "-X main.toolVersion=${tag}" + "-X main.builtBy=nixpkgs" + ]; + + doCheck = true; + + doInstallCheck = true; + installCheckPhase = '' + $out/bin/tfk8s --version | grep ${tag} > /dev/null + ''; + + passthru.tests = { + sample1 = callPackage ./tests/sample1 { }; + }; + + 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 ]; + }; +} |