mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
60 lines
1.2 KiB
Nix
60 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
llvmPackages,
|
|
nix-update-script,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "luau";
|
|
version = "0.677";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "luau-lang";
|
|
repo = "luau";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-cX0WoiK1CZBwPrQfYSJAGcQzM91Trn3PGsQigGX8jds=";
|
|
};
|
|
|
|
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
|
|
install -Dm755 -t $out/bin luau-compile
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
|
|
./Luau.UnitTest
|
|
./Luau.Conformance
|
|
|
|
runHook postCheck
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "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/${finalAttrs.version}";
|
|
license = lib.licenses.mit;
|
|
platforms = lib.platforms.all;
|
|
maintainers = with lib.maintainers; [
|
|
prince213
|
|
HeitorAugustoLN
|
|
];
|
|
mainProgram = "luau";
|
|
};
|
|
})
|