···44 webpage = "http://erratique.ch/software/${pname}";
55in
6677-assert stdenv.lib.versionAtLeast ocaml.version "3.12";
88-99-let param =
1010- if stdenv.lib.versionAtLeast ocaml.version "4.02"
1111- then {
1212- version = "1.3.0";
1313- sha256 = "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n";
1414- buildInputs = [ topkg ];
1515- inherit (topkg) buildPhase;
1616- } else {
1717- version = "1.2.0";
1818- sha256 = "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh";
1919- buildInputs = [];
2020- buildPhase = "./pkg/build true";
2121- };
2222-in
77+if !stdenv.lib.versionAtLeast ocaml.version "4.02"
88+then throw "xmlm is not available for OCaml ${ocaml.version}"
99+else
23102411stdenv.mkDerivation rec {
2525- name = "ocaml-${pname}-${version}";
2626- inherit (param) version;
1212+ name = "ocaml${ocaml.version}-${pname}-${version}";
1313+ version = "1.3.0";
27142815 src = fetchurl {
2916 url = "${webpage}/releases/${pname}-${version}.tbz";
3030- inherit (param) sha256;
1717+ sha256 = "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n";
3118 };
32193333- buildInputs = [ ocaml findlib ocamlbuild ] ++ param.buildInputs;
2020+ buildInputs = [ ocaml findlib ocamlbuild topkg ];
34213522 unpackCmd = "tar xjf $src";
36233737- inherit (param) buildPhase;
3838- inherit (topkg) installPhase;
2424+ inherit (topkg) buildPhase installPhase;
39254026 meta = with stdenv.lib; {
4127 description = "An OCaml streaming codec to decode and encode the XML data format";
+2-2
pkgs/development/tools/ocaml/findlib/default.nix
···5050 if test -d "''$1/lib/ocaml/${ocaml.version}/site-lib"; then
5151 export OCAMLPATH="''${OCAMLPATH}''${OCAMLPATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/"
5252 fi
5353- if test -d "''$1/lib/ocaml/${ocaml.version}/site-lib/stubslibs"; then
5454- export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/stubslibs"
5353+ if test -d "''$1/lib/ocaml/${ocaml.version}/site-lib/stublibs"; then
5454+ export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/stublibs"
5555 fi
5656 export OCAMLFIND_DESTDIR="''$out/lib/ocaml/${ocaml.version}/site-lib/"
5757 if test -n "$createFindlibDestdir"; then