2022-11-27 13:25:49 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenvNoCC
|
|
|
|
, mlton
|
|
|
|
, lua5_3
|
|
|
|
}:
|
|
|
|
|
2023-09-27 03:17:40 +00:00
|
|
|
let
|
|
|
|
version = "0.0.20230924";
|
|
|
|
in
|
2022-11-27 13:25:49 +00:00
|
|
|
stdenvNoCC.mkDerivation {
|
2023-09-27 03:17:40 +00:00
|
|
|
inherit version;
|
2022-11-27 13:25:49 +00:00
|
|
|
|
2023-09-27 03:17:40 +00:00
|
|
|
pname = "lunarml";
|
2022-11-27 13:25:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "minoki";
|
|
|
|
repo = "LunarML";
|
2023-09-27 03:17:40 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "QN5iJEpJJZZuUfY/z57bpOQHDU31ecmJPWQtkXsLmDg=";
|
2022-11-27 13:25:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
mlton
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
lua5_3
|
|
|
|
];
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
make -C thirdparty install
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2023-08-29 16:30:19 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $doc/lunarml $out/{bin,lib}
|
2022-11-27 13:25:49 +00:00
|
|
|
cp -r bin $out
|
|
|
|
cp -r lib $out
|
2023-08-29 16:30:19 +00:00
|
|
|
cp -r example $doc/lunarml
|
|
|
|
|
|
|
|
runHook postInstall
|
2022-11-27 13:25:49 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Standard ML compiler that produces Lua/JavaScript";
|
|
|
|
homepage = "https://github.com/minoki/LunarML";
|
|
|
|
license = lib.licenses.mit;
|
2023-08-29 16:30:19 +00:00
|
|
|
maintainers = with lib.maintainers; [ toastal ratsclub ];
|
2022-11-27 13:25:49 +00:00
|
|
|
platforms = mlton.meta.platforms;
|
|
|
|
};
|
|
|
|
}
|