1{ stdenv, lib, fetchFromGitHub, emscripten }:
2
3let version = "0.11.2"; in
4
5stdenv.mkDerivation {
6 name = "jsonnet-${version}";
7 version = version;
8
9 src = fetchFromGitHub {
10 rev = "v${version}";
11 owner = "google";
12 repo = "jsonnet";
13 sha256 = "05rl5i4g36k2ikxv4sw726mha1qf5bb66wiqpi0s09wj9azm7vym";
14 };
15
16 buildInputs = [ emscripten ];
17
18 enableParallelBuilding = true;
19
20 makeFlags = [''EM_CACHE=$(TMPDIR)/.em_cache'' ''all''];
21
22 installPhase = ''
23 mkdir -p $out/bin $out/lib $out/share/
24 cp jsonnet $out/bin/
25 cp libjsonnet.so $out/lib/
26 cp -a doc $out/share/doc
27 cp -a include $out/include
28 '';
29
30 meta = {
31 description = "Purely-functional configuration language that helps you define JSON data";
32 maintainers = with lib.maintainers; [ benley copumpkin ];
33 license = lib.licenses.asl20;
34 homepage = https://github.com/google/jsonnet;
35 platforms = lib.platforms.unix;
36 };
37}