depot/third_party/nixpkgs/pkgs/development/compilers/lunarml/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

57 lines
982 B
Nix

{ lib
, fetchFromGitHub
, stdenvNoCC
, mlton
, lua5_3
}:
let
version = "0.0.20231113";
in
stdenvNoCC.mkDerivation {
inherit version;
pname = "lunarml";
src = fetchFromGitHub {
owner = "minoki";
repo = "LunarML";
rev = "refs/tags/v${version}";
hash = "sha256-LmS+pkdCraY8sor+lsq/vCODFyVneKkZqjZqbJ1trb4=";
};
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;
};
}