From 2cf27dbed8059c3f5398c558910c74a12174c7de Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 22 Oct 2022 04:20:00 +0000 Subject: [PATCH] luau: init at 0.550 --- .../development/interpreters/luau/default.nix | 43 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/interpreters/luau/default.nix diff --git a/pkgs/development/interpreters/luau/default.nix b/pkgs/development/interpreters/luau/default.nix new file mode 100644 index 000000000000..184df75d7a98 --- /dev/null +++ b/pkgs/development/interpreters/luau/default.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, fetchFromGitHub, cmake }: + +stdenv.mkDerivation rec { + pname = "luau"; + version = "0.550"; + + src = fetchFromGitHub { + owner = "Roblox"; + repo = "luau"; + rev = version; + sha256 = "sha256-bCZ1V3ygN6+6IHWxT8VPi7vWVk711fki9aIPUUsjiQA="; + }; + + nativeBuildInputs = [ cmake ]; + + 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; { + homepage = "https://luau-lang.org/"; + description = "A fast, small, safe, gradually typed embeddable scripting language derived from Lua"; + license = licenses.mit; + platforms = platforms.all; + maintainers = [ maintainers.marsam ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1e25d5bbf669..39b125f5a371 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15524,6 +15524,8 @@ with pkgs; luarocks = luaPackages.luarocks; luarocks-nix = luaPackages.luarocks-nix; + luau = callPackage ../development/interpreters/luau { }; + toluapp = callPackage ../development/tools/toluapp { lua = lua5_1; # doesn't work with any other :( };