nixpkgs/pkgs/development/interpreters/luau/default.nix

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

47 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, cmake, llvmPackages }:
2022-10-22 04:20:00 +00:00
stdenv.mkDerivation rec {
pname = "luau";
version = "0.598";
2022-10-22 04:20:00 +00:00
src = fetchFromGitHub {
owner = "Roblox";
repo = "luau";
rev = version;
hash = "sha256-B3ggPrhvq1kYmclmuomi6PhXIwN8GKBzbKRLIjH0pac=";
2022-10-22 04:20:00 +00:00
};
nativeBuildInputs = [ cmake ];
buildInputs = lib.optionals stdenv.cc.isClang [ llvmPackages.libunwind ];
2022-10-22 04:20:00 +00:00
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/Roblox/luau/releases/tag/${version}";
2022-10-22 04:20:00 +00:00
license = licenses.mit;
platforms = platforms.all;
maintainers = [ maintainers.marsam ];
};
}