about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2018-06-04 18:28:12 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2018-06-06 07:14:29 +0000
commit2e851f96519f999d5e645ca556193353f2d39186 (patch)
treec72a90911926e05841adffb07c082b3c2ca2f01a /pkgs/development/ocaml-modules
parenta4fa4c45cc7f0d2057729f0103a1600de32d642d (diff)
downloadnixlib-2e851f96519f999d5e645ca556193353f2d39186.tar
nixlib-2e851f96519f999d5e645ca556193353f2d39186.tar.gz
nixlib-2e851f96519f999d5e645ca556193353f2d39186.tar.bz2
nixlib-2e851f96519f999d5e645ca556193353f2d39186.tar.lz
nixlib-2e851f96519f999d5e645ca556193353f2d39186.tar.xz
nixlib-2e851f96519f999d5e645ca556193353f2d39186.tar.zst
nixlib-2e851f96519f999d5e645ca556193353f2d39186.zip
ocamlPackages.xmlm: remove at 1.2.0
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/xmlm/default.nix30
1 files changed, 8 insertions, 22 deletions
diff --git a/pkgs/development/ocaml-modules/xmlm/default.nix b/pkgs/development/ocaml-modules/xmlm/default.nix
index 9d3a0b1bb4d0..a1765296d57d 100644
--- a/pkgs/development/ocaml-modules/xmlm/default.nix
+++ b/pkgs/development/ocaml-modules/xmlm/default.nix
@@ -4,38 +4,24 @@ let
   webpage = "http://erratique.ch/software/${pname}";
 in
 
-assert stdenv.lib.versionAtLeast ocaml.version "3.12";
-
-let param =
-  if stdenv.lib.versionAtLeast ocaml.version "4.02"
-  then {
-    version = "1.3.0";
-    sha256 = "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n";
-    buildInputs = [ topkg ];
-    inherit (topkg) buildPhase;
-  } else {
-    version = "1.2.0";
-    sha256 = "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh";
-    buildInputs = [];
-    buildPhase = "./pkg/build true";
-  };
-in
+if !stdenv.lib.versionAtLeast ocaml.version "4.02"
+then throw "xmlm is not available for OCaml ${ocaml.version}"
+else
 
 stdenv.mkDerivation rec {
-  name = "ocaml-${pname}-${version}";
-  inherit (param) version;
+  name = "ocaml${ocaml.version}-${pname}-${version}";
+  version = "1.3.0";
 
   src = fetchurl {
     url = "${webpage}/releases/${pname}-${version}.tbz";
-    inherit (param) sha256;
+    sha256 = "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild ] ++ param.buildInputs;
+  buildInputs = [ ocaml findlib ocamlbuild topkg ];
 
   unpackCmd = "tar xjf $src";
 
-  inherit (param) buildPhase;
-  inherit (topkg) installPhase;
+  inherit (topkg) buildPhase installPhase;
 
   meta = with stdenv.lib; {
     description = "An OCaml streaming codec to decode and encode the XML data format";