From 15b6e9efd4f4f7a2f0d530f102edd2f07f787d78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Sun, 23 Oct 2022 12:17:56 -0300 Subject: [PATCH] fstar: do not use ppxlib >= 0.26 See https://github.com/FStarLang/FStar/issues/2681 When a fix is availabe, this work around should be removed. --- pkgs/top-level/all-packages.nix | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4d56fca00178..e4f5dc76582e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14211,7 +14211,37 @@ with pkgs; fsharp = callPackage ../development/compilers/fsharp { }; - fstar = callPackage ../development/compilers/fstar { }; + fstar = callPackage ../development/compilers/fstar { + # Work around while compatibility with ppxlib >= 0.26 is unavailable + # Should be removed when a fix is availaible + # See https://github.com/FStarLang/FStar/issues/2681 + ocamlPackages = + ocamlPackages.overrideScope' (self: super: { + ppxlib = super.ppxlib.override { + version = if lib.versionAtLeast self.ocaml.version "4.07" + then if lib.versionAtLeast self.ocaml.version "4.08" + then "0.24.0" else "0.15.0" else "0.13.0"; + }; + ppx_deriving_yojson = super.ppx_deriving_yojson.overrideAttrs (oldAttrs: rec { + version = "3.6.1"; + src = fetchFromGitHub { + owner = "ocaml-ppx"; + repo = "ppx_deriving_yojson"; + rev = "v${version}"; + sha256 = "1icz5h6p3pfj7my5gi7wxpflrb8c902dqa17f9w424njilnpyrbk"; + }; + }); + sedlex = super.sedlex.overrideAttrs (oldAttrs: rec { + version = "2.5"; + src = fetchFromGitHub { + owner = "ocaml-community"; + repo = "sedlex"; + rev = "v${version}"; + sha256 = "sha256:062a5dvrzvb81l3a9phljrhxfw9nlb61q341q0a6xn65hll3z2wy"; + }; + }); + }); + }; dotnetPackages = recurseIntoAttrs (callPackage ./dotnet-packages.nix {});