2024-04-21 15:54:59 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, gitUpdater, llvmPackages }:
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "luau";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.621";
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-11-16 04:20:00 +00:00
|
|
|
owner = "luau-lang";
|
2022-10-30 15:09:59 +00:00
|
|
|
repo = "luau";
|
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-bkuYYGYcnMwQDK81ZH+74hA4XaQfVFMWvAKpy+ODCak=";
|
2022-10-30 15:09:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = lib.optionals stdenv.cc.isClang [ llvmPackages.libunwind ];
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 -t $out/bin luau
|
|
|
|
install -Dm755 -t $out/bin luau-analyze
|
2024-04-21 15:54:59 +00:00
|
|
|
install -Dm755 -t $out/bin luau-compile
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
./Luau.UnitTest
|
|
|
|
./Luau.Conformance
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A fast, small, safe, gradually typed embeddable scripting language derived from Lua";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://luau-lang.org/";
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/luau-lang/luau/releases/tag/${version}";
|
2022-10-30 15:09:59 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = [ ];
|
2024-01-25 14:12:00 +00:00
|
|
|
mainProgram = "luau";
|
2022-10-30 15:09:59 +00:00
|
|
|
};
|
|
|
|
}
|