1{ stdenv, lib, fetchFromGitHub }:
2
3stdenv.mkDerivation rec {
4 pname = "jsonnet";
5 version = "0.13.0";
6
7 src = fetchFromGitHub {
8 rev = "v${version}";
9 owner = "google";
10 repo = "jsonnet";
11 sha256 = "1fibr1kysbxcf8jp2a4xvs3n7i8d9k2430agxzc9mdyqrh79zlxk";
12 };
13
14 enableParallelBuilding = true;
15
16 makeFlags = [
17 "jsonnet"
18 "jsonnetfmt"
19 "libjsonnet.so"
20 ];
21
22 installPhase = ''
23 mkdir -p $out/bin $out/lib $out/include
24 cp jsonnet $out/bin/
25 cp jsonnetfmt $out/bin/
26 cp libjsonnet*.so $out/lib/
27 cp -a include/*.h $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}