ocamlPackages.melange: init at 4.0.1-52 + 4.0.0-51 + 4.0.0-414
This commit is contained in:
parent
ac0c0e1c33
commit
97d45f98f2
83
pkgs/development/tools/ocaml/melange/default.nix
Normal file
83
pkgs/development/tools/ocaml/melange/default.nix
Normal 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
|
||||
];
|
||||
};
|
||||
}
|
@ -1070,6 +1070,8 @@ let
|
||||
|
||||
mec = callPackage ../development/ocaml-modules/mec { };
|
||||
|
||||
melange = callPackage ../development/tools/ocaml/melange { };
|
||||
|
||||
memprof-limits = callPackage ../development/ocaml-modules/memprof-limits { };
|
||||
|
||||
memtrace = callPackage ../development/ocaml-modules/memtrace { };
|
||||
|
Loading…
Reference in New Issue
Block a user