Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 pkg-config, 6 fontconfig, 7 ocaml, 8}: 9 10stdenv.mkDerivation { 11 pname = "ocaml${ocaml.version}-fontconfig"; 12 version = "unstable-2013-11-03"; 13 14 src = fetchFromGitHub { 15 owner = "flh"; 16 repo = "ocaml-fontconfig"; 17 rev = "42daf1697ffcee9c89ee4be3103b6427f7a7b7e5"; 18 sha256 = "1fw6bzydmnyh2g4x35mcbg0hypnxqhynivk4nakcsx7prr8zr3yh"; 19 }; 20 21 postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "4.03") '' 22 substituteInPlace extract_consts.ml \ 23 --replace String.lowercase String.lowercase_ascii \ 24 --replace String.capitalize String.capitalize_ascii 25 ''; 26 27 nativeBuildInputs = [ 28 pkg-config 29 ocaml 30 ]; 31 buildInputs = [ fontconfig ]; 32 33 strictDeps = true; 34 35 makeFlags = [ 36 "OCAML_STDLIB_DIR=$(out)/lib/ocaml/${lib.getVersion ocaml}/site-lib/" 37 "OCAML_HAVE_OCAMLOPT=yes" 38 ]; 39 40 meta = { 41 description = "Fontconfig bindings for OCaml"; 42 license = lib.licenses.gpl2Plus; 43 platforms = ocaml.meta.platforms; 44 maintainers = with lib.maintainers; [ vbgl ]; 45 }; 46}