mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 04:03:56 +00:00
1fa341fcc4
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/ocaml4.05.0-yojson/versions. These checks were done: - built on NixOS - ran `/nix/store/k3c6sbqahg7xbrraipzbbbvkrncfbb78-ocaml4.05.0-yojson-1.4.1/bin/ydump --help` got 0 exit code - ran `/nix/store/k3c6sbqahg7xbrraipzbbbvkrncfbb78-ocaml4.05.0-yojson-1.4.1/bin/ydump --help` and found version 1.4.1 - found 1.4.1 with grep in /nix/store/k3c6sbqahg7xbrraipzbbbvkrncfbb78-ocaml4.05.0-yojson-1.4.1 - directory tree listing: https://gist.github.com/45ad3b6379841d4750efc7dcfe6b602f
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ stdenv, fetchzip, ocaml, findlib, jbuilder, cppo, easy-format, biniou }:
|
|
let
|
|
pname = "yojson";
|
|
param =
|
|
if stdenv.lib.versionAtLeast ocaml.version "4.02" then {
|
|
version = "1.4.1";
|
|
sha256 = "0nwsfkmqpyfab4rxq76q8ff7giyanghw08094jyrp275v99zdjr9";
|
|
buildInputs = [ jbuilder ];
|
|
extra = { inherit (jbuilder) installPhase; };
|
|
} else {
|
|
version = "1.2.3";
|
|
sha256 = "10dvkndgwanvw4agbjln7kgb1n9s6lii7jw82kwxczl5rd1sgmvl";
|
|
buildInputs = [];
|
|
extra = {
|
|
createFindlibDestdir = true;
|
|
|
|
makeFlags = "PREFIX=$(out)";
|
|
|
|
preBuild = "mkdir $out/bin";
|
|
};
|
|
};
|
|
in
|
|
stdenv.mkDerivation ({
|
|
|
|
name = "ocaml${ocaml.version}-${pname}-${param.version}";
|
|
|
|
src = fetchzip {
|
|
url = "https://github.com/mjambon/${pname}/archive/v${param.version}.tar.gz";
|
|
inherit (param) sha256;
|
|
};
|
|
|
|
buildInputs = [ ocaml findlib ] ++ param.buildInputs;
|
|
|
|
propagatedBuildInputs = [ cppo easy-format biniou ];
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "An optimized parsing and printing library for the JSON format";
|
|
homepage = "http://mjambon.com/${pname}.html";
|
|
license = licenses.bsd3;
|
|
maintainers = [ maintainers.vbgl ];
|
|
platforms = ocaml.meta.platforms or [];
|
|
};
|
|
} // param.extra)
|