Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 38 lines 1.0 kB view raw
1{ stdenv, fetchurl, ocaml, findlib, ocamlbuild }: 2 3assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12"; 4 5let param = 6 if stdenv.lib.versionAtLeast ocaml.version "4.02" 7 then { 8 version = "20171003"; 9 sha256 = "06zwsskri8kaqjdszj9360nf36zvwh886xwf033aija8c9k4w6cx"; 10 } else { 11 version = "20140424"; 12 sha256 = "0sc9q89dnyarcg24czyhr6ams0ylqvia3745s6rfwd2nldpygsdk"; 13}; in 14 15stdenv.mkDerivation { 16 17 name = "ocaml${ocaml.version}-pprint-${param.version}"; 18 19 src = fetchurl { 20 url = "http://gallium.inria.fr/~fpottier/pprint/pprint-${param.version}.tar.gz"; 21 inherit (param) sha256; 22 }; 23 24 buildInputs = [ ocaml findlib ocamlbuild ]; 25 26 createFindlibDestdir = true; 27 28 dontBuild = true; 29 installFlags = "-C src"; 30 31 meta = with stdenv.lib; { 32 homepage = http://gallium.inria.fr/~fpottier/pprint/; 33 description = "An OCaml adaptation of Wadlers and Leijens prettier printer"; 34 license = licenses.cecill-c; 35 maintainers = [ maintainers.vbgl ]; 36 platforms = ocaml.meta.platforms or []; 37 }; 38}