Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
62 lines
1.3 KiB
Nix
62 lines
1.3 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
jekyll,
|
|
cmake,
|
|
fetchFromGitHub,
|
|
gtest,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "jsonnet";
|
|
version = "0.21.0";
|
|
outputs = [
|
|
"out"
|
|
"doc"
|
|
];
|
|
|
|
src = fetchFromGitHub {
|
|
rev = "v${version}";
|
|
owner = "google";
|
|
repo = "jsonnet";
|
|
sha256 = "sha256-QHp0DOu/pqcgN7di219cHzfFb7fWtdGGE6J1ZXgbOGQ=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
jekyll
|
|
cmake
|
|
];
|
|
buildInputs = [ gtest ];
|
|
|
|
cmakeFlags = [
|
|
"-DUSE_SYSTEM_GTEST=ON"
|
|
"-DBUILD_STATIC_LIBS=${if stdenv.hostPlatform.isStatic then "ON" else "OFF"}"
|
|
]
|
|
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
|
"-DBUILD_SHARED_BINARIES=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
# Upstream writes documentation in html, not in markdown/rst, so no
|
|
# other output formats, sorry.
|
|
postBuild = ''
|
|
jekyll build --source ../doc --destination ./html
|
|
'';
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/share/doc/jsonnet
|
|
cp -r ./html $out/share/doc/jsonnet
|
|
'';
|
|
|
|
meta = {
|
|
description = "Purely-functional configuration language that helps you define JSON data";
|
|
maintainers = with lib.maintainers; [
|
|
benley
|
|
];
|
|
license = lib.licenses.asl20;
|
|
homepage = "https://github.com/google/jsonnet";
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|