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