ocamlPackages.melange: init at 4.0.1-52 + 4.0.0-51 + 4.0.0-414 (#359923)

This commit is contained in:
Ulrik Strid 2024-11-29 12:49:56 +01:00 committed by GitHub
commit b8d9c3b2ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 92 additions and 0 deletions

View File

@ -23358,6 +23358,13 @@
name = "Vinicius Bernardino"; name = "Vinicius Bernardino";
keys = [ { fingerprint = "F0D3 920C 722A 541F 0CCD 66E3 A7BA BA05 3D78 E7CA"; } ]; keys = [ { fingerprint = "F0D3 920C 722A 541F 0CCD 66E3 A7BA BA05 3D78 E7CA"; } ];
}; };
vog = {
email = "v@njh.eu";
github = "vog";
githubId = 412749;
name = "Volker Diels-Grabsch";
keys = [ { fingerprint = "A7E6 9C4F 69DC 5D6C FC84 EE34 A29F BD51 5F89 90AF"; } ];
};
voidless = { voidless = {
email = "julius.schmitt@yahoo.de"; email = "julius.schmitt@yahoo.de";
github = "voidIess"; github = "voidIess";

View File

@ -0,0 +1,83 @@
{
buildDunePackage,
cmdliner,
cppo,
dune-build-info,
fetchurl,
jq,
lib,
makeWrapper,
menhirLib,
merlin,
nodejs,
ocaml,
ounit2,
ppxlib,
reason,
stdenv,
tree,
}:
let
pname = "melange";
versionHash =
if lib.versionAtLeast ocaml.version "5.2" then
{
version = "4.0.1-52";
hash = "sha256-kUlChqQtLX7zh90GK23ibMqyI/MIp0sMYLjkPX9vdTc=";
}
else if lib.versionAtLeast ocaml.version "5.1" then
{
version = "4.0.0-51";
hash = "sha256-940Yzp1ZXnN6mKVWY+nqKjn4qtBUJR5eHE55OTjGvdU=";
}
else
{
version = "4.0.0-414";
hash = "sha256-PILDOXYIyLvfv1sSwP6WSdCiXfpYdnct7WMw3jHBLJM=";
};
version = versionHash.version;
hash = versionHash.hash;
in
buildDunePackage {
inherit pname;
inherit version;
minimalOCamlVersion = "4.14";
src = fetchurl {
url = "https://github.com/melange-re/${pname}/releases/download/${version}/${pname}-${version}.tbz";
inherit hash;
};
nativeBuildInputs = [
cppo
makeWrapper
];
propagatedBuildInputs = [
cmdliner
dune-build-info
menhirLib
ppxlib
];
doCheck = true;
nativeCheckInputs = [
jq
merlin
nodejs
reason
tree
];
checkInputs = [
ounit2
];
postInstall = ''
wrapProgram "$out/bin/melc" --set MELANGELIB "$OCAMLFIND_DESTDIR/melange/melange:$OCAMLFIND_DESTDIR/melange/js/melange"
'';
meta = {
description = "Toolchain to produce JS from Reason/OCaml";
homepage = "https://melange.re/";
mainProgram = "melc";
license = lib.licenses.lgpl3;
maintainers = [
lib.maintainers.vog
];
};
}

View File

@ -1070,6 +1070,8 @@ let
mec = callPackage ../development/ocaml-modules/mec { }; mec = callPackage ../development/ocaml-modules/mec { };
melange = callPackage ../development/tools/ocaml/melange { };
memprof-limits = callPackage ../development/ocaml-modules/memprof-limits { }; memprof-limits = callPackage ../development/ocaml-modules/memprof-limits { };
memtrace = callPackage ../development/ocaml-modules/memtrace { }; memtrace = callPackage ../development/ocaml-modules/memtrace { };