From a8e31672284c2f894290fba5ff9e1aa6fd7c3a08 Mon Sep 17 00:00:00 2001 From: Kim Simmons Date: Fri, 15 Nov 2013 17:20:29 +0100 Subject: [PATCH 1/2] LuaJIT: New package Just-in-time compiler for lua 5.1 with strong focus on performance. Uses the same API as lua 5.1 which makes it extremely easy to integrate. --- .../interpreters/luajit/default.nix | 22 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/interpreters/luajit/default.nix diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix new file mode 100644 index 000000000000..f4a8e3169275 --- /dev/null +++ b/pkgs/development/interpreters/luajit/default.nix @@ -0,0 +1,22 @@ +{stdenv, fetchurl} : + +stdenv.mkDerivation rec{ + version = "2.0.2"; + name = "LuaJIT-${version}"; + + src = fetchurl { + url="http://luajit.org/download/LuaJIT-2.0.2.tar.gz"; + sha256="0f3cykihfdn3gi6na9p0xjd4jnv26z18m441n5vyg42q9abh4ln0"; + }; + + installPhase = '' + mkdir -p $out + make install PREFIX=$out + ''; + + meta = { + description= "Just-in-time compiler and interpreter for lua 5.1."; + homepage = http://luajit.org; + license = stdenv.lib.licenses.mit; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 85b0aaed6f1f..aab9415294d0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3174,6 +3174,8 @@ let lua = lua5; }; + luajit = callPackage ../development/interpreters/luajit {}; + lush2 = callPackage ../development/interpreters/lush {}; maude = callPackage ../development/interpreters/maude { }; From 49bf24649144edd7c356c0c79ee38cf54fba791c Mon Sep 17 00:00:00 2001 From: Kim Simmons Date: Fri, 15 Nov 2013 17:41:33 +0100 Subject: [PATCH 2/2] Minifix: didn't use the name variable in the package. --- pkgs/development/interpreters/luajit/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix index f4a8e3169275..e5e3aed8d124 100644 --- a/pkgs/development/interpreters/luajit/default.nix +++ b/pkgs/development/interpreters/luajit/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec{ name = "LuaJIT-${version}"; src = fetchurl { - url="http://luajit.org/download/LuaJIT-2.0.2.tar.gz"; + url="http://luajit.org/download/${name}.tar.gz"; sha256="0f3cykihfdn3gi6na9p0xjd4jnv26z18m441n5vyg42q9abh4ln0"; };