diff --git a/pkgs/development/compilers/jsonnet/default.nix b/pkgs/development/compilers/jsonnet/default.nix new file mode 100644 index 00000000000..b200df8d767 --- /dev/null +++ b/pkgs/development/compilers/jsonnet/default.nix @@ -0,0 +1,35 @@ +{ stdenv, lib, fetchFromGitHub, emscripten }: + +let version = "0.8.5"; in + +stdenv.mkDerivation { + name = "jsonnet-${version}"; + + srcs = fetchFromGitHub { + rev = "v${version}"; + owner = "google"; + repo = "jsonnet"; + sha256 = "14raml69zfr38r4qghdgy129vdq2vq1ivl3a2y02isfpijxcajxn"; + }; + + buildInputs = [ emscripten ]; + + enableParallelBuilding = true; + + makeFlags = [''EM_CACHE=$(TMPDIR)/.em_cache'' ''all'']; + + installPhase = '' + mkdir -p $out/bin $out/lib $out/share/ + cp jsonnet $out/bin/ + cp libjsonnet.so $out/lib/ + cp -a doc $out/share/doc + cp -a include $out/include + ''; + + meta = { + description = "Purely-functional configuration language that helps you define JSON data"; + maintainers = [ lib.maintainers.benley ]; + license = lib.licenses.apache; + homepage = https://github.com/google/jsonnet; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 034fcc8d0df..a70465581dc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6783,6 +6783,8 @@ let jsoncpp = callPackage ../development/libraries/jsoncpp { }; + jsonnet = callPackage ../development/compilers/jsonnet { }; + libjson = callPackage ../development/libraries/libjson { }; judy = callPackage ../development/libraries/judy { };