Skip to content

Commit

Permalink
lunarml: init at unstable-2023-06-25
Browse files Browse the repository at this point in the history
  • Loading branch information
toastal committed Jun 27, 2023
1 parent d0bccdf commit c4e9569
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
58 changes: 58 additions & 0 deletions pkgs/development/compilers/lunarml/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{ lib
, fetchFromGitHub
, fetchzip
, stdenvNoCC
, mlton
, lua5_3
, luajit
, nodejs
, withExamples ? false
}:

let
pname = "lunarml";
in
stdenvNoCC.mkDerivation {
inherit pname;

version = "unstable-2023-06-25";

src = fetchFromGitHub {
owner = "minoki";
repo = "LunarML";
rev = "f58f90cf7a2f26340403245907ed183f6a12ab52";
sha256 = "djHJfUAPplsejFW9L3fbwTeeWgvR+gKkI8TmwIh8n7E=";
};

nativeBuildInputs = [
mlton
];

nativeCheckInputs = [
lua5_3
luajit
nodejs
];

postBuild = ''
make -C thirdparty install
'';

doCheck = true;

installPhase = ''
mkdir -p $out/{bin,lib,share/doc/${pname}}
cp -r bin lib $out
cp -r doc/* README.* LICENSE* $out/share/doc/${pname}
'' + lib.optionalString withExamples ''
cp -Tr example $out/share/doc/${pname}/example
'';

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;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16139,6 +16139,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 { };
Expand Down

0 comments on commit c4e9569

Please sign in to comment.