nixpkgs/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix
Vincent Laporte dd7cc10443 ocaml-ng.ocamlPackages_4_14.ocaml: 4.14.3 → 4.14.4
(cherry picked from commit 1e150a99b7)
2026-06-18 18:56:07 +00:00

62 lines
1.5 KiB
Nix

{
lib,
fetchurl,
ocaml,
buildDunePackage,
cmdliner,
yojson,
ppxlib,
findlib,
menhir,
menhirLib,
sedlex,
version ?
if lib.versionAtLeast ocaml.version "4.13" then
"6.3.2"
else if lib.versionAtLeast ocaml.version "4.11" then
"6.0.1"
else
"5.8.2",
}:
buildDunePackage {
pname = "js_of_ocaml-compiler";
inherit version;
src = fetchurl {
url = "https://github.com/ocsigen/js_of_ocaml/releases/download/${version}/js_of_ocaml-${version}.tbz";
hash =
{
"6.3.2" = "sha256-qTr8llTsNGRwH7zg3M86i+uVCKyxLGBFd2vyzxBsq8A=";
"6.2.0" = "sha256-fMZBd40bFyo1KogzPuDoxiE2WgrPzZuH44v9243Spdo=";
"6.1.1" = "sha256-0x2kGq5hwCqqi01QTk6TcFIz0wPNgaB7tKxe7bA9YBQ=";
"6.0.1" = "sha256-gT2+4rYuFUEEnqI6IOQFzyROJ+v6mFl4XPpT4obSxhQ=";
"5.9.1" = "sha256-aMlcYIcdjpyaVMgvNeLtUEE7y0QPIg0LNRayoe4ccwc=";
"5.8.2" = "sha256-ciAZS9L5sU2VgVOlogZ1A1nXtJ3hL+iNdFDThc7L8Eo=";
}
."${version}";
};
nativeBuildInputs = [ menhir ];
buildInputs = [
cmdliner
ppxlib
];
propagatedBuildInputs = [
menhirLib
yojson
findlib
sedlex
];
meta = {
description = "Compiler from OCaml bytecode to Javascript";
homepage = "https://ocsigen.org/js_of_ocaml/";
license = lib.licenses.gpl2;
maintainers = [ lib.maintainers.vbgl ];
mainProgram = "js_of_ocaml";
broken =
(ocaml.version == "4.14.3" || ocaml.version == "4.14.4") && !lib.versionAtLeast version "6.0.0";
};
}