Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / interpreters / luau / default.nix
blobbf81832f464b15e05ed9dae20611c2a367ea619b
1 { lib, stdenv, fetchFromGitHub, cmake, llvmPackages }:
3 stdenv.mkDerivation rec {
4   pname = "luau";
5   version = "0.603";
7   src = fetchFromGitHub {
8     owner = "luau-lang";
9     repo = "luau";
10     rev = version;
11     hash = "sha256-8jm58F2AQcmjy19fydGLOD5fehaaNHGqXtDPu121jmw=";
12   };
14   nativeBuildInputs = [ cmake ];
16   buildInputs = lib.optionals stdenv.cc.isClang [ llvmPackages.libunwind ];
18   installPhase = ''
19     runHook preInstall
21     install -Dm755 -t $out/bin luau
22     install -Dm755 -t $out/bin luau-analyze
24     runHook postInstall
25   '';
27   doCheck = true;
29   checkPhase = ''
30     runHook preCheck
32     ./Luau.UnitTest
33     ./Luau.Conformance
35     runHook postCheck
36   '';
38   meta = with lib; {
39     description = "A fast, small, safe, gradually typed embeddable scripting language derived from Lua";
40     homepage = "https://luau-lang.org/";
41     changelog = "https://github.com/luau-lang/luau/releases/tag/${version}";
42     license = licenses.mit;
43     platforms = platforms.all;
44     maintainers = [ maintainers.marsam ];
45   };