Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 fetchurl, 5 fetchpatch, 6 ocaml, 7 findlib, 8 ocaml_pcre, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "ocaml${ocaml.version}-inifiles"; 13 version = "1.2"; 14 15 src = fetchurl { 16 url = "mirror://ubuntu/pool/universe/o/ocaml-inifiles/ocaml-inifiles_${version}.orig.tar.gz"; 17 sha256 = "0jhzgiypmh6hwsv1zpiq77fi0cvcmwbiy5x0yg7mz6p3dh1dmkns"; 18 }; 19 20 patches = [ 21 (fetchpatch { 22 url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/ocaml-inifiles/ocaml-inifiles.1.2/files/ocaml-inifiles.diff"; 23 sha256 = "037kk3172s187w8vwsykdxlpklxzc7m7np57sapk499d8adzdgwn"; 24 }) 25 ]; 26 27 postPatch = '' 28 substituteInPlace inifiles.ml --replace 'String.lowercase ' 'String.lowercase_ascii ' 29 ''; 30 31 nativeBuildInputs = [ 32 ocaml 33 findlib 34 ]; 35 propagatedBuildInputs = [ ocaml_pcre ]; 36 37 strictDeps = true; 38 39 buildFlags = [ 40 "all" 41 "opt" 42 ]; 43 44 createFindlibDestdir = true; 45 46 meta = { 47 description = "Small OCaml library to read and write .ini files"; 48 license = lib.licenses.lgpl21Plus; 49 inherit (ocaml.meta) platforms; 50 }; 51}