From 2b413270b507de57324c8d04c789a40c147913c4 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 2 Dec 2024 15:23:02 +0100 Subject: [PATCH] =?UTF-8?q?ocamlPackages.js=5Fof=5Focaml:=205.8.2=20?= =?UTF-8?q?=E2=86=92=205.9.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../development/tools/ocaml/js_of_ocaml/compiler.nix | 12 ++++++++---- pkgs/development/tools/ocaml/js_of_ocaml/default.nix | 4 ++-- pkgs/development/tools/ocaml/js_of_ocaml/lwt.nix | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix b/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix index 54067eb63d21..15fa959c90fa 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix @@ -1,16 +1,20 @@ -{ lib, fetchurl, buildDunePackage +{ lib, fetchurl, ocaml, buildDunePackage , cmdliner, yojson, ppxlib, findlib , menhir, menhirLib, sedlex +, version ? if lib.versionAtLeast ocaml.version "4.11" then "5.9.1" else "5.8.2" }: -buildDunePackage rec { +buildDunePackage { pname = "js_of_ocaml-compiler"; - version = "5.8.2"; + inherit version; minimalOCamlVersion = "4.08"; src = fetchurl { url = "https://github.com/ocsigen/js_of_ocaml/releases/download/${version}/js_of_ocaml-${version}.tbz"; - hash = "sha256-ciAZS9L5sU2VgVOlogZ1A1nXtJ3hL+iNdFDThc7L8Eo="; + hash = { + "5.9.1" = "sha256-aMlcYIcdjpyaVMgvNeLtUEE7y0QPIg0LNRayoe4ccwc="; + "5.8.2" = "sha256-ciAZS9L5sU2VgVOlogZ1A1nXtJ3hL+iNdFDThc7L8Eo="; + }."${version}"; }; nativeBuildInputs = [ menhir ]; diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix index 71e35f749e83..0ee5e4452947 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix @@ -1,5 +1,5 @@ { buildDunePackage, js_of_ocaml-compiler -, ppxlib, uchar +, ppxlib }: buildDunePackage { @@ -9,7 +9,7 @@ buildDunePackage { buildInputs = [ ppxlib ]; - propagatedBuildInputs = [ js_of_ocaml-compiler uchar ]; + propagatedBuildInputs = [ js_of_ocaml-compiler ]; meta = builtins.removeAttrs js_of_ocaml-compiler.meta [ "mainProgram" ]; } diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/lwt.nix b/pkgs/development/tools/ocaml/js_of_ocaml/lwt.nix index 90d92415a9fc..5f25fca582be 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/lwt.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/lwt.nix @@ -1,5 +1,5 @@ { buildDunePackage, js_of_ocaml-compiler, js_of_ocaml-ppx -, js_of_ocaml, ocaml_lwt, lwt_log +, js_of_ocaml, lwt, lwt_log }: buildDunePackage { @@ -9,7 +9,7 @@ buildDunePackage { buildInputs = [ js_of_ocaml-ppx ]; - propagatedBuildInputs = [ js_of_ocaml ocaml_lwt lwt_log ]; + propagatedBuildInputs = [ js_of_ocaml lwt lwt_log ]; meta = builtins.removeAttrs js_of_ocaml-compiler.meta [ "mainProgram" ]; }