From 2e851f96519f999d5e645ca556193353f2d39186 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 4 Jun 2018 18:28:12 +0000 Subject: ocamlPackages.xmlm: remove at 1.2.0 --- pkgs/development/ocaml-modules/xmlm/default.nix | 30 +++++++------------------ 1 file changed, 8 insertions(+), 22 deletions(-) (limited to 'pkgs/development/ocaml-modules') 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"; -- cgit 1.4.1