about summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorNick Novitski <nick@expo.io>2018-10-02 15:56:42 -0700
committerNick Novitski <nick@expo.io>2018-10-04 13:52:45 -0700
commit78b9ab0713227419814504e367f2736e92940a62 (patch)
tree68db441d3f2dc1e82ba64021d792265570853925 /pkgs/applications/networking
parentbae2f2dbda35912fe7d9e9cd0ce6e1e6335d8a34 (diff)
downloadnixlib-78b9ab0713227419814504e367f2736e92940a62.tar
nixlib-78b9ab0713227419814504e367f2736e92940a62.tar.gz
nixlib-78b9ab0713227419814504e367f2736e92940a62.tar.bz2
nixlib-78b9ab0713227419814504e367f2736e92940a62.tar.lz
nixlib-78b9ab0713227419814504e367f2736e92940a62.tar.xz
nixlib-78b9ab0713227419814504e367f2736e92940a62.tar.zst
nixlib-78b9ab0713227419814504e367f2736e92940a62.zip
kubeval: init at 0.7.3
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/cluster/kubeval/default.nix48
-rw-r--r--pkgs/applications/networking/cluster/kubeval/deps.nix174
2 files changed, 222 insertions, 0 deletions
diff --git a/pkgs/applications/networking/cluster/kubeval/default.nix b/pkgs/applications/networking/cluster/kubeval/default.nix
new file mode 100644
index 000000000000..55a827f9cf92
--- /dev/null
+++ b/pkgs/applications/networking/cluster/kubeval/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, lib, fetchFromGitHub, buildGoPackage, makeWrapper }:
+
+let
+
+  # Cache schema as a package so network calls are not
+  # necessary at runtime, allowing use in package builds
+  schema = stdenv.mkDerivation rec {
+    name = "kubeval-schema";
+    src = fetchFromGitHub {
+      owner = "garethr";
+      repo = "kubernetes-json-schema";
+      rev = "c7672fd48e1421f0060dd54b6620baa2ab7224ba";
+      sha256 = "0picr3wvjx4qv158jy4f60pl225rm4mh0l97pf8nqi9h9x4x888p";
+    };
+
+    installPhase = ''
+      mkdir -p $out/kubernetes-json-schema/master
+      cp -R . $out/kubernetes-json-schema/master
+    '';
+   };
+
+in
+
+buildGoPackage rec {
+  name = "kubeval-${version}";
+  version = "0.7.3";
+
+  goPackagePath = "github.com/garethr/kubeval";
+  src = fetchFromGitHub {
+    owner = "garethr";
+    repo = "kubeval";
+    rev = version;
+    sha256 = "042v4mc5p80vmk56wp6aw89yiibjnfqn79c0zcd6y179br4gpfnb";
+  };
+  goDeps = ./deps.nix;
+
+  buildInputs = [ makeWrapper ];
+
+  postFixup = "wrapProgram $bin/bin/kubeval --set KUBEVAL_SCHEMA_LOCATION file:///${schema}";
+
+  meta = with lib; {
+    description = "Validate your Kubernetes configuration files";
+    homepage = https://github.com/garethr/kubeval;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ nicknovitski ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/networking/cluster/kubeval/deps.nix b/pkgs/applications/networking/cluster/kubeval/deps.nix
new file mode 100644
index 000000000000..b9565e927ded
--- /dev/null
+++ b/pkgs/applications/networking/cluster/kubeval/deps.nix
@@ -0,0 +1,174 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
+[
+  {
+    goPackagePath = "github.com/fatih/color";
+    fetch = {
+      type = "git";
+      url = "https://github.com/fatih/color";
+      rev = "5b77d2a35fb0ede96d138fc9a99f5c9b6aef11b4";
+      sha256 = "0v8msvg38r8d1iiq2i5r4xyfx0invhc941kjrsg5gzwvagv55inv";
+    };
+  }
+  {
+    goPackagePath = "github.com/fsnotify/fsnotify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/fsnotify/fsnotify";
+      rev = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9";
+      sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g";
+    };
+  }
+  {
+    goPackagePath = "github.com/hashicorp/go-multierror";
+    fetch = {
+      type = "git";
+      url = "https://github.com/hashicorp/go-multierror";
+      rev = "b7773ae218740a7be65057fc60b366a49b538a44";
+      sha256 = "09904bk7ac6qs9dgiv23rziq9h3makb9qg4jvxr71rlydsd7psfd";
+    };
+  }
+  {
+    goPackagePath = "github.com/hashicorp/hcl";
+    fetch = {
+      type = "git";
+      url = "https://github.com/hashicorp/hcl";
+      rev = "ef8a98b0bbce4a65b5aa4c368430a80ddc533168";
+      sha256 = "1qalfsc31fra7hcw2lc3s20aj7al62fq3j5fn5kga3mg99b82nyr";
+    };
+  }
+  {
+    goPackagePath = "github.com/magiconair/properties";
+    fetch = {
+      type = "git";
+      url = "https://github.com/magiconair/properties";
+      rev = "c2353362d570a7bfa228149c62842019201cfb71";
+      sha256 = "1a10362wv8a8qwb818wygn2z48lgzch940hvpv81hv8gc747ajxn";
+    };
+  }
+  {
+    goPackagePath = "github.com/mitchellh/mapstructure";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mitchellh/mapstructure";
+      rev = "bb74f1db0675b241733089d5a1faa5dd8b0ef57b";
+      sha256 = "1aqk9qr46bwgdc5j7n7als61xvssvyjf4qzfsvhacl4izpygqnw7";
+    };
+  }
+  {
+    goPackagePath = "github.com/pelletier/go-toml";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pelletier/go-toml";
+      rev = "66540cf1fcd2c3aee6f6787dfa32a6ae9a870f12";
+      sha256 = "1n8na0yg90gm0rpifmzrby5r385vvd62cdam3ls7ssy02bjvfw15";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/afero";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/afero";
+      rev = "787d034dfe70e44075ccc060d346146ef53270ad";
+      sha256 = "0138rjiacl71h7kvhzinviwvy6qa2m6rflpv9lgqv15hnjvhwvg1";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/cast";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/cast";
+      rev = "8965335b8c7107321228e3e3702cab9832751bac";
+      sha256 = "177bk7lq40jbgv9p9r80aydpaccfk8ja3a7jjhfwiwk9r1pa4rr2";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/cobra";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/cobra";
+      rev = "1e58aa3361fd650121dceeedc399e7189c05674a";
+      sha256 = "1d6dy60dw7i2mcab10yp99wi5w28jzhzzf16w4ys6bna7ymndiin";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/jwalterweatherman";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/jwalterweatherman";
+      rev = "7c0cea34c8ece3fbeb2b27ab9b59511d360fb394";
+      sha256 = "132p84i20b9s5r6fs597lsa6648vd415ch7c0d018vm8smzqpd0h";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/pflag";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/pflag";
+      rev = "3ebe029320b2676d667ae88da602a5f854788a8a";
+      sha256 = "11yxs0wqy70wj106fkz8r923yg4ncnc2mbw33v48zmlg4a1rasgp";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/viper";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/viper";
+      rev = "b5e8006cbee93ec955a89ab31e0e3ce3204f3736";
+      sha256 = "0y3r6ysi5vn0yq5c7pbl62yg2i64fkv54xgj2jf1hn3v6zzyimis";
+    };
+  }
+  {
+    goPackagePath = "github.com/xeipuuv/gojsonpointer";
+    fetch = {
+      type = "git";
+      url = "https://github.com/xeipuuv/gojsonpointer";
+      rev = "4e3ac2762d5f479393488629ee9370b50873b3a6";
+      sha256 = "13y6iq2nzf9z4ls66bfgnnamj2m3438absmbpqry64bpwjfbsi9q";
+    };
+  }
+  {
+    goPackagePath = "github.com/xeipuuv/gojsonreference";
+    fetch = {
+      type = "git";
+      url = "https://github.com/xeipuuv/gojsonreference";
+      rev = "bd5ef7bd5415a7ac448318e64f11a24cd21e594b";
+      sha256 = "1xby79padc7bmyb8rfbad8wfnfdzpnh51b1n8c0kibch0kwc1db5";
+    };
+  }
+  {
+    goPackagePath = "github.com/xeipuuv/gojsonschema";
+    fetch = {
+      type = "git";
+      url = "https://github.com/xeipuuv/gojsonschema";
+      rev = "9ff6d6c47f3f5de55acc6f464d6e3719b02818ae";
+      sha256 = "0rpkya4lnpv9g33bs0z3vd5dlnadkyq1lg7114nbd73vm878s6sw";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sys";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sys";
+      rev = "2d6f6f883a06fc0d5f4b14a81e4c28705ea64c15";
+      sha256 = "1a6x6n1fk5k013w5r4b0bxws1d2fh0s69mbzpi1vkyfpcxabwjhj";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/text";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/text";
+      rev = "5c1cf69b5978e5a34c5f9ba09a83e56acc4b7877";
+      sha256 = "03br8p1sb1ffr02l8hyrgcyib7ms0z06wy3v4r1dj2l6q4ghwzfs";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/yaml.v2";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/yaml.v2";
+      rev = "5420a8b6744d3b0345ab293f6fcba19c978f1183";
+      sha256 = "0dwjrs2lp2gdlscs7bsrmyc5yf6mm4fvgw71bzr9mv2qrd2q73s1";
+    };
+  }
+]