From 26e7964ad124b9ce910bd62e007887e807aafcdd Mon Sep 17 00:00:00 2001 From: toastal Date: Sun, 27 Nov 2022 20:25:49 +0700 Subject: [PATCH] lunarml: init at unstable-2023-06-25 --- .../development/compilers/lunarml/default.nix | 54 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/development/compilers/lunarml/default.nix diff --git a/pkgs/development/compilers/lunarml/default.nix b/pkgs/development/compilers/lunarml/default.nix new file mode 100644 index 000000000000..ff3122ce2198 --- /dev/null +++ b/pkgs/development/compilers/lunarml/default.nix @@ -0,0 +1,54 @@ +{ lib +, fetchFromGitHub +, stdenvNoCC +, mlton +, lua5_3 +}: + +let + pname = "lunarml"; +in +stdenvNoCC.mkDerivation { + inherit pname; + + version = "unstable-2023-06-25"; + + src = fetchFromGitHub { + owner = "minoki"; + repo = "LunarML"; + rev = "f58f90cf7a2f26340403245907ed183f6a12ab52"; + sha256 = "djHJfUAPplsejFW9L3fbwTeeWgvR+gKkI8TmwIh8n7E="; + }; + + outputs = [ "out" "doc" ]; + + nativeBuildInputs = [ + mlton + ]; + + nativeCheckInputs = [ + lua5_3 + ]; + + postBuild = '' + make -C thirdparty install + ''; + + doCheck = true; + + installPhase = '' + mkdir -p $doc/${pname} $out/{bin,lib} + cp -r bin $out + cp -r lib $out + cp -r doc/* README.* LICENSE* $doc/${pname} + cp -r example $doc/${pname} + ''; + + meta = { + description = "Standard ML compiler that produces Lua/JavaScript"; + homepage = "https://github.com/minoki/LunarML"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ toastal ]; + platforms = mlton.meta.platforms; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4bc30d8e8e76..7428dffddf1d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16313,6 +16313,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) CoreServices Security; }; + lunarml = callPackage ../development/compilers/lunarml { }; + manticore = callPackage ../development/compilers/manticore { }; marst = callPackage ../development/compilers/marst { };