diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2023-05-12 22:35:45 +0200 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2023-05-15 10:10:31 +0200 |
commit | 77f983732c0fcdd2df55e141209ba7c776416f1d (patch) | |
tree | 4c04cd7cc5c5ffefa330dbc290f18329647b41c4 | |
parent | abeb0f46c6e97f240d8c41a2dbddc961c20ae22b (diff) |
ocamlPackages.ocaml_expat: remove at 0.9.1 (for OCaml < 4.02)
-rw-r--r-- | pkgs/development/ocaml-modules/expat/0.9.nix | 54 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/expat/default.nix | 3 | ||||
-rw-r--r-- | pkgs/top-level/ocaml-packages.nix | 5 |
3 files changed, 4 insertions, 58 deletions
diff --git a/pkgs/development/ocaml-modules/expat/0.9.nix b/pkgs/development/ocaml-modules/expat/0.9.nix deleted file mode 100644 index 326ffc60b1adc..0000000000000 --- a/pkgs/development/ocaml-modules/expat/0.9.nix +++ /dev/null @@ -1,54 +0,0 @@ -{stdenv, lib, fetchurl, ocaml, findlib, ounit, expat}: - -let - pname = "ocaml-expat"; - testcase = fetchurl { - url = "http://www.w3.org/TR/1998/REC-xml-19980210.xml"; - sha256 = "00a3gsfvlkdhmcbziqhvpvy1zmcgbcihfqwcvl6ay03zf7gvw0k1"; - }; - -in - -stdenv.mkDerivation rec { - name = "${pname}-${version}"; - version = "0.9.1"; - - src = fetchurl { - url = "http://www.xs4all.nl/~mmzeeman/ocaml/${pname}-${version}.tar.gz"; - sha256 = "16n2j3y0jc9xgqyshw9plrwqnjiz30vnpbhahmgxlidbycw8rgjz"; - }; - - nativeBuildInputs = [ocaml findlib ]; - buildInputs = [ ounit expat]; - - strictDeps = true; - - createFindlibDestdir = true; - - patches = [ ./unittest.patch ]; - - postPatch = '' - substituteInPlace "unittest.ml" \ - --replace "/home/maas/xml-samples/REC-xml-19980210.xml.txt" "${testcase}" - substituteInPlace Makefile --replace "EXPAT_LIBDIR=/usr/local/lib" "EXPAT_LIBDIR=${expat.out}/lib" \ - --replace "EXPAT_INCDIR=/usr/local/include" "EXPAT_INCDIR=${expat.dev}/include" \ - --replace "gcc" "\$(CC)" - ''; - - dontConfigure = true; # Skip configure - - buildPhase = '' - make all allopt - ''; - - doCheck = true; - - checkTarget = "testall"; - - meta = { - homepage = "http://www.xs4all.nl/~mmzeeman/ocaml/"; - description = "An ocaml wrapper for the Expat XML parsing library"; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.roconnor ]; - }; -} diff --git a/pkgs/development/ocaml-modules/expat/default.nix b/pkgs/development/ocaml-modules/expat/default.nix index 0bd6c733e6fbd..679459eadaced 100644 --- a/pkgs/development/ocaml-modules/expat/default.nix +++ b/pkgs/development/ocaml-modules/expat/default.nix @@ -1,5 +1,8 @@ { stdenv, lib, fetchFromGitHub, expat, ocaml, findlib, ounit }: +lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02") + "ocaml_expat is not available for OCaml ${ocaml.version}" + stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-expat"; version = "1.1.0"; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index efe610cbd0d49..7f305b79e927e 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1107,10 +1107,7 @@ let ocaml_cryptgps = callPackage ../development/ocaml-modules/cryptgps { }; - ocaml_expat = - if lib.versionAtLeast ocaml.version "4.02" - then callPackage ../development/ocaml-modules/expat { } - else callPackage ../development/ocaml-modules/expat/0.9.nix { }; + ocaml_expat = callPackage ../development/ocaml-modules/expat { }; ocaml-freestanding = callPackage ../development/ocaml-modules/ocaml-freestanding { }; |