From ac0c0e1c33742a4d10ccd6e1bdb26c4b46768815 Mon Sep 17 00:00:00 2001 From: Volker Diels-Grabsch Date: Thu, 28 Nov 2024 19:28:47 +0100 Subject: [PATCH 1/2] maintainers: add vog --- maintainers/maintainer-list.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 7ddcc64800c9..6743208bca09 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -23353,6 +23353,13 @@ name = "Vinicius Bernardino"; 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 = { email = "julius.schmitt@yahoo.de"; github = "voidIess"; From 97d45f98f22f39d6af400a45028221feda64c56e Mon Sep 17 00:00:00 2001 From: Volker Diels-Grabsch Date: Thu, 28 Nov 2024 19:42:01 +0100 Subject: [PATCH 2/2] ocamlPackages.melange: init at 4.0.1-52 + 4.0.0-51 + 4.0.0-414 --- .../tools/ocaml/melange/default.nix | 83 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 85 insertions(+) create mode 100644 pkgs/development/tools/ocaml/melange/default.nix diff --git a/pkgs/development/tools/ocaml/melange/default.nix b/pkgs/development/tools/ocaml/melange/default.nix new file mode 100644 index 000000000000..c81ca2a6cf56 --- /dev/null +++ b/pkgs/development/tools/ocaml/melange/default.nix @@ -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 + ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 6f244496f514..35cb14aff535 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -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 { };