summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorJoachim F <joachifm@users.noreply.github.com>2018-03-14 20:51:12 +0000
committerGitHub <noreply@github.com>2018-03-14 20:51:12 +0000
commitbfb4e0822ac57c3b3f2c7f734d225046ae0d57eb (patch)
treef031fd5a7bb05df7fa903a1b52781f2b3bddb9f4 /pkgs/development/tools
parent7c08d10a4335899a9b8098fbe2e017fc76ac6c92 (diff)
parentba4356f5856874ebda4211289b35f48e2bbd93b3 (diff)
downloadnixlib-bfb4e0822ac57c3b3f2c7f734d225046ae0d57eb.tar
nixlib-bfb4e0822ac57c3b3f2c7f734d225046ae0d57eb.tar.gz
nixlib-bfb4e0822ac57c3b3f2c7f734d225046ae0d57eb.tar.bz2
nixlib-bfb4e0822ac57c3b3f2c7f734d225046ae0d57eb.tar.lz
nixlib-bfb4e0822ac57c3b3f2c7f734d225046ae0d57eb.tar.xz
nixlib-bfb4e0822ac57c3b3f2c7f734d225046ae0d57eb.tar.zst
nixlib-bfb4e0822ac57c3b3f2c7f734d225046ae0d57eb.zip
Merge pull request #36482 from matthewbauer/json2hcl
json2hcl: init at 0.0.6
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/json2hcl/default.nix25
-rw-r--r--pkgs/development/tools/json2hcl/deps.nix20
2 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/tools/json2hcl/default.nix b/pkgs/development/tools/json2hcl/default.nix
new file mode 100644
index 000000000000..d53b39021339
--- /dev/null
+++ b/pkgs/development/tools/json2hcl/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  pname = "json2hcl";
+  name = "${pname}-${version}";
+  version = "0.0.6";
+
+  src = fetchFromGitHub {
+    inherit owner;
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0knil88n2w41w3nzqz6ljgfjkl5r3x0bh7ifqgiyf6sin3pl4pn0";
+  };
+
+  owner = "kvz";
+  goPackagePath = "github.com/${owner}/${pname}";
+  goDeps = ./deps.nix;
+
+  meta = with lib; {
+    description = "Convert JSON to HCL, and vice versa";
+    license = with licenses; [ mit ];
+    maintainers = [ maintainers.matthewbauer ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/development/tools/json2hcl/deps.nix b/pkgs/development/tools/json2hcl/deps.nix
new file mode 100644
index 000000000000..bb9df28ad87f
--- /dev/null
+++ b/pkgs/development/tools/json2hcl/deps.nix
@@ -0,0 +1,20 @@
+[
+  {
+    goPackagePath = "github.com/Acconut/hcl";
+    fetch = {
+      type = "git";
+      url = "https://github.com/Acconut/hcl";
+      rev = "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8";
+      sha256 = "0db4lpqb5m130rmfy3s3gjjf4dxllypmyrzxv6ggqhkmwmc7w4mc";
+    };
+  }
+  {
+    goPackagePath = "github.com/hashicorp/hcl";
+    fetch = {
+      type = "git";
+      url = "https://github.com/hashicorp/hcl";
+      rev = "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8";
+      sha256 = "0db4lpqb5m130rmfy3s3gjjf4dxllypmyrzxv6ggqhkmwmc7w4mc";
+    };
+  }
+]