From ab51ade9a319d14cda36fb2a06f1a76af35e7ac0 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 20 Apr 2021 05:46:16 +0200 Subject: [PATCH] haxe: build versions < 4.2 with OCaml 4.10 --- pkgs/development/compilers/haxe/default.nix | 17 ++++++++++++++--- pkgs/development/ocaml-modules/extlib/1.7.7.nix | 7 +++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/haxe/default.nix b/pkgs/development/compilers/haxe/default.nix index c9e5a097de1..d5277899892 100644 --- a/pkgs/development/compilers/haxe/default.nix +++ b/pkgs/development/compilers/haxe/default.nix @@ -2,7 +2,7 @@ let ocamlDependencies = version: - if lib.versionAtLeast version "4.0" + if lib.versionAtLeast version "4.2" then with ocaml-ng.ocamlPackages; [ ocaml findlib @@ -13,8 +13,19 @@ let sha dune_2 luv - (if lib.versionAtLeast version "4.2" - then ocaml_extlib else ocaml_extlib-1-7-7) + ocaml_extlib + ] else if lib.versionAtLeast version "4.0" + then with ocaml-ng.ocamlPackages_4_10; [ + ocaml + findlib + sedlex_2 + xml-light + ptmap + camlp5 + sha + dune_2 + luv + ocaml_extlib-1-7-7 ] else with ocaml-ng.ocamlPackages_4_05; [ ocaml camlp4 diff --git a/pkgs/development/ocaml-modules/extlib/1.7.7.nix b/pkgs/development/ocaml-modules/extlib/1.7.7.nix index 3314ebcb9b5..d27fe085569 100644 --- a/pkgs/development/ocaml-modules/extlib/1.7.7.nix +++ b/pkgs/development/ocaml-modules/extlib/1.7.7.nix @@ -1,11 +1,14 @@ # Older version of extlib for Haxe 4.0 and 4.1. # May be replaceable by the next extlib + extlib-base64 release. -{ fetchurl, ocaml_extlib }: +{ lib, fetchurl, ocaml, ocaml_extlib }: -ocaml_extlib.overrideAttrs (_: rec { +ocaml_extlib.overrideAttrs (x: rec { version = "1.7.7"; src = fetchurl { url = "https://github.com/ygrek/ocaml-extlib/releases/download/${version}/extlib-${version}.tar.gz"; sha256 = "1sxmzc1mx3kg62j8kbk0dxkx8mkf1rn70h542cjzrziflznap0s1"; }; + meta = x.meta // { + broken = lib.versionAtLeast ocaml.version "4.12"; + }; })