From 5e9eae4ba5215e58b5cc529b5907481185c51f3e Mon Sep 17 00:00:00 2001 From: Pierrot Date: Fri, 13 Sep 2024 11:30:31 +0200 Subject: [PATCH] Add zarith_stubs_js v0.17.0 in nix-shell (#1233) Some primitives have been added in the latest version of `zarith_stubs_js` and we need them for the js version of Alt-Ergo. --- nix/default.nix | 1 + nix/sources.json | 8 ++++++++ nix/zarith_stubs_js.nix | 16 ++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 nix/zarith_stubs_js.nix diff --git a/nix/default.nix b/nix/default.nix index 7742f9083..77d971f49 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -12,6 +12,7 @@ import sources.nixpkgs { dolmen_loop = pkgs.callPackage ./dolmen_loop.nix { }; landmarks = pkgs.callPackage ./landmarks.nix { }; landmarks-ppx = pkgs.callPackage ./landmarks-ppx.nix { }; + zarith_stubs_js = pkgs.callPackage ./zarith_stubs_js.nix { }; }); }) ]; diff --git a/nix/sources.json b/nix/sources.json index 27bb847e8..5292a95e7 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -62,5 +62,13 @@ "url": "https://github.com/Armael/pp_loc/archive/d8162fd289849ea2f4125054ab88540416bdaa25.tar.gz", "url_template": "https://github.com///archive/.tar.gz", "version": "2.1.0" + }, + "zarith_stubs_js": { + "branch": "v0.17.0", + "sha256": "07anr6r4chbpgd7c5ixfqgqr99kb202bd7q350hdqynrn7v6rn20", + "type": "tarball", + "url": "https://github.com/janestreet/zarith_stubs_js/archive/refs/tags/v0.17.0.tar.gz", + "url_template": "https://github.com/janestreet/zarith_stubs_js/archive/refs/tags/v0.17.0.tar.gz", + "version": "0.17.0" } } diff --git a/nix/zarith_stubs_js.nix b/nix/zarith_stubs_js.nix new file mode 100644 index 000000000..e6a6a97ca --- /dev/null +++ b/nix/zarith_stubs_js.nix @@ -0,0 +1,16 @@ +{ sources, lib, ocamlPackages }: + +let + zarith_stubs_js = sources.zarith_stubs_js; +in + +ocamlPackages.buildDunePackage { + strictDeps = true; + pname = "zarith_stubs_js"; + inherit (zarith_stubs_js) version; + + minimalOCamlVersion = "4.08"; + duneVersion = "3"; + + src = zarith_stubs_js; +}