23b612e36f
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
47 lines
1 KiB
Nix
47 lines
1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, llvmPackages }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "luau";
|
|
version = "0.609";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "luau-lang";
|
|
repo = "luau";
|
|
rev = version;
|
|
hash = "sha256-L8ANZW4TyFNBn8tb5Y3k9zdGBbWbEVFUnjAkhfaZu3M=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = lib.optionals stdenv.cc.isClang [ llvmPackages.libunwind ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm755 -t $out/bin luau
|
|
install -Dm755 -t $out/bin luau-analyze
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
|
|
./Luau.UnitTest
|
|
./Luau.Conformance
|
|
|
|
runHook postCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A fast, small, safe, gradually typed embeddable scripting language derived from Lua";
|
|
homepage = "https://luau-lang.org/";
|
|
changelog = "https://github.com/luau-lang/luau/releases/tag/${version}";
|
|
license = licenses.mit;
|
|
platforms = platforms.all;
|
|
maintainers = [ maintainers.marsam ];
|
|
mainProgram = "luau";
|
|
};
|
|
}
|