ocamlPackages.ppx_tools : Add a version for ocaml 4.03

This commit is contained in:
Théophane Hufschmitt 2016-07-20 14:51:20 +02:00
parent 7bb3a04064
commit f0bbb906e9

View File

@ -1,10 +1,19 @@
{ stdenv, fetchzip, ocaml, findlib }:
{ stdenv, fetchFromGitHub, ocaml, findlib }:
let
version =
if stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.03" then "5.0+4.03.0" else "5.0+4.02.0";
in
stdenv.mkDerivation {
name = "ocaml-ppx_tools-5.0+4.02";
src = fetchzip {
url = https://github.com/alainfrisch/ppx_tools/archive/5.0+4.02.0.tar.gz;
sha256 = "16drjk0qafjls8blng69qiv35a84wlafpk16grrg2i3x19p8dlj8";
name = "ocaml-ppx_tools-${version}";
src = fetchFromGitHub {
owner = "alainfrisch";
repo = "ppx_tools";
rev = version;
sha256 = if version == "5.0+4.03.0"
then "061v1fl5z7z3ywi4ppryrlcywnvnqbsw83ppq72qmkc7ma4603jg"
else "16drjk0qafjls8blng69qiv35a84wlafpk16grrg2i3x19p8dlj8"
;
};
buildInputs = [ ocaml findlib ];