571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
51 lines
1.4 KiB
Nix
51 lines
1.4 KiB
Nix
{ stdenv, lib, jekyll, cmake, fetchFromGitHub, gtest }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "jsonnet";
|
|
version = "0.20.0";
|
|
outputs = [ "out" "doc" ];
|
|
|
|
src = fetchFromGitHub {
|
|
rev = "v${version}";
|
|
owner = "google";
|
|
repo = "jsonnet";
|
|
sha256 = "sha256-FtVJE9alEl56Uik+nCpJMV5DMVVmRCnE1xMAiWdK39Y=";
|
|
};
|
|
|
|
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"}"
|
|
];
|
|
|
|
# https://github.com/google/jsonnet/issues/778
|
|
patches = [
|
|
./fix-cpp-unresolved-symbols.patch
|
|
];
|
|
|
|
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 copumpkin ];
|
|
license = lib.licenses.asl20;
|
|
homepage = "https://github.com/google/jsonnet";
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|