mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 13:43:22 +00:00
58 lines
977 B
Nix
58 lines
977 B
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, stdenvNoCC
|
|
, mlton
|
|
, lua5_3
|
|
}:
|
|
|
|
let
|
|
version = "0.0.20230924";
|
|
in
|
|
stdenvNoCC.mkDerivation {
|
|
inherit version;
|
|
|
|
pname = "lunarml";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "minoki";
|
|
repo = "LunarML";
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "QN5iJEpJJZZuUfY/z57bpOQHDU31ecmJPWQtkXsLmDg=";
|
|
};
|
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
nativeBuildInputs = [
|
|
mlton
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
lua5_3
|
|
];
|
|
|
|
postBuild = ''
|
|
make -C thirdparty install
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $doc/lunarml $out/{bin,lib}
|
|
cp -r bin $out
|
|
cp -r lib $out
|
|
cp -r example $doc/lunarml
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Standard ML compiler that produces Lua/JavaScript";
|
|
homepage = "https://github.com/minoki/LunarML";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ toastal ratsclub ];
|
|
platforms = mlton.meta.platforms;
|
|
};
|
|
}
|