From 1753b206485ca00f04bebb8810209c5f51cc9505 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 11 Feb 2019 16:21:46 +0000 Subject: [PATCH] ocaml: init at 4.08.0+beta1 --- pkgs/development/compilers/ocaml/4.08.nix | 9 +++++++++ pkgs/development/compilers/ocaml/generic.nix | 6 ++++-- pkgs/top-level/ocaml-packages.nix | 2 ++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/compilers/ocaml/4.08.nix diff --git a/pkgs/development/compilers/ocaml/4.08.nix b/pkgs/development/compilers/ocaml/4.08.nix new file mode 100644 index 000000000000..3365c47c0d6d --- /dev/null +++ b/pkgs/development/compilers/ocaml/4.08.nix @@ -0,0 +1,9 @@ +import ./generic.nix { + major_version = "4"; + minor_version = "08"; + patch_version = "0+beta1"; + sha256 = "1jgvp4pyhrg27wqpsx88kacw3ymjiz44nms9lzbh5s8pp05z5f5f"; + + # If the executable is stripped it does not work + dontStrip = true; +} diff --git a/pkgs/development/compilers/ocaml/generic.nix b/pkgs/development/compilers/ocaml/generic.nix index 7ada5b804e35..0085739147bf 100644 --- a/pkgs/development/compilers/ocaml/generic.nix +++ b/pkgs/development/compilers/ocaml/generic.nix @@ -41,8 +41,10 @@ stdenv.mkDerivation (args // rec { }; prefixKey = "-prefix "; - configureFlags = optionals useX11 [ "-x11lib" x11lib - "-x11include" x11inc ] + configureFlags = optionals useX11 ( + if stdenv.lib.versionAtLeast version "4.08" + then [ "--x-libraries=${x11lib}" "--x-includes=${x11inc}"] + else [ "-x11lib" x11lib "-x11include" x11inc ]) ++ optional flambdaSupport "-flambda" ; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 1adf66d5eb78..510fd62f2405 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1072,6 +1072,8 @@ in let inherit (pkgs) callPackage; in rec ocamlPackages_4_07 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.07.nix { }); + ocamlPackages_4_08 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.08.nix { }); + ocamlPackages_latest = ocamlPackages_4_07; ocamlPackages = ocamlPackages_4_06;