nixpkgs/pkgs/by-name/lu/lunarml/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1003 B
Nix
Raw Normal View History

2022-11-27 13:25:49 +00:00
{ lib
, fetchFromGitHub
, stdenvNoCC
, mlton
, lua5_3
}:
2024-11-12 08:57:25 +00:00
stdenvNoCC.mkDerivation (finalAttrs: {
2024-11-12 09:06:03 +00:00
version = "0.2.1";
2022-11-27 13:25:49 +00:00
pname = "lunarml";
2022-11-27 13:25:49 +00:00
src = fetchFromGitHub {
owner = "minoki";
repo = "LunarML";
2024-11-12 08:57:25 +00:00
rev = "refs/tags/v${finalAttrs.version}";
2024-11-12 09:06:03 +00:00
hash = "sha256-wNcsvtIR/MbvwAIhybc7zzbS+RgfwndQ1jdDVdte+44=";
2022-11-27 13:25:49 +00:00
};
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}
2022-11-27 13:25:49 +00:00
cp -r bin $out
cp -r lib $out
cp -r example $doc/lunarml
runHook postInstall
2022-11-27 13:25:49 +00:00
'';
meta = {
description = "Standard ML compiler that produces Lua/JavaScript";
mainProgram = "lunarml";
2022-11-27 13:25:49 +00:00
homepage = "https://github.com/minoki/LunarML";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ toastal ratsclub ];
2022-11-27 13:25:49 +00:00
platforms = mlton.meta.platforms;
};
2024-11-12 08:57:25 +00:00
})