forked from mirrors/nixpkgs
luajit: format with nixpkgs-fmt
This commit is contained in:
parent
d5fe0d2b6e
commit
a15ee4845b
|
@ -1,13 +1,16 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, buildPackages
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, buildPackages
|
||||||
, name ? "luajit-${version}"
|
, name ? "luajit-${version}"
|
||||||
, isStable
|
, isStable
|
||||||
, sha256
|
, sha256
|
||||||
, rev
|
, rev
|
||||||
, version
|
, version
|
||||||
, extraMeta ? {}
|
, extraMeta ? { }
|
||||||
, callPackage
|
, callPackage
|
||||||
, self
|
, self
|
||||||
, packageOverrides ? (self: super: {})
|
, packageOverrides ? (self: super: { })
|
||||||
, enableFFI ? true
|
, enableFFI ? true
|
||||||
, enableJIT ? true
|
, enableJIT ? true
|
||||||
, enableJITDebugModule ? enableJIT
|
, enableJITDebugModule ? enableJIT
|
||||||
|
@ -24,25 +27,25 @@ assert enableJITDebugModule -> enableJIT;
|
||||||
assert enableGDBJITSupport -> enableJIT;
|
assert enableGDBJITSupport -> enableJIT;
|
||||||
assert enableValgrindSupport -> valgrind != null;
|
assert enableValgrindSupport -> valgrind != null;
|
||||||
let
|
let
|
||||||
luaPackages = callPackage ../../lua-modules {lua=self; overrides=packageOverrides;};
|
luaPackages = callPackage ../../lua-modules { lua = self; overrides = packageOverrides; };
|
||||||
|
|
||||||
XCFLAGS = with lib;
|
XCFLAGS = with lib;
|
||||||
optional (!enableFFI) "-DLUAJIT_DISABLE_FFI"
|
optional (!enableFFI) "-DLUAJIT_DISABLE_FFI"
|
||||||
++ optional (!enableJIT) "-DLUAJIT_DISABLE_JIT"
|
++ optional (!enableJIT) "-DLUAJIT_DISABLE_JIT"
|
||||||
++ optional enable52Compat "-DLUAJIT_ENABLE_LUA52COMPAT"
|
++ optional enable52Compat "-DLUAJIT_ENABLE_LUA52COMPAT"
|
||||||
++ optional (!enableGC64) "-DLUAJIT_DISABLE_GC64"
|
++ optional (!enableGC64) "-DLUAJIT_DISABLE_GC64"
|
||||||
++ optional useSystemMalloc "-DLUAJIT_USE_SYSMALLOC"
|
++ optional useSystemMalloc "-DLUAJIT_USE_SYSMALLOC"
|
||||||
++ optional enableValgrindSupport "-DLUAJIT_USE_VALGRIND"
|
++ optional enableValgrindSupport "-DLUAJIT_USE_VALGRIND"
|
||||||
++ optional enableGDBJITSupport "-DLUAJIT_USE_GDBJIT"
|
++ optional enableGDBJITSupport "-DLUAJIT_USE_GDBJIT"
|
||||||
++ optional enableAPICheck "-DLUAJIT_USE_APICHECK"
|
++ optional enableAPICheck "-DLUAJIT_USE_APICHECK"
|
||||||
++ optional enableVMAssertions "-DLUAJIT_USE_ASSERT"
|
++ optional enableVMAssertions "-DLUAJIT_USE_ASSERT"
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
inherit name version;
|
inherit name version;
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "LuaJIT";
|
owner = "LuaJIT";
|
||||||
repo = "LuaJIT";
|
repo = "LuaJIT";
|
||||||
inherit sha256 rev;
|
inherit sha256 rev;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,8 +85,10 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
LuaPathSearchPaths = [
|
LuaPathSearchPaths = [
|
||||||
"lib/lua/${luaversion}/?.lua" "share/lua/${luaversion}/?.lua"
|
"lib/lua/${luaversion}/?.lua"
|
||||||
"share/lua/${luaversion}/?/init.lua" "lib/lua/${luaversion}/?/init.lua"
|
"share/lua/${luaversion}/?.lua"
|
||||||
|
"share/lua/${luaversion}/?/init.lua"
|
||||||
|
"lib/lua/${luaversion}/?/init.lua"
|
||||||
"share/${name}/?.lua"
|
"share/${name}/?.lua"
|
||||||
];
|
];
|
||||||
LuaCPathSearchPaths = [ "lib/lua/${luaversion}/?.so" "share/lua/${luaversion}/?.so" ];
|
LuaCPathSearchPaths = [ "lib/lua/${luaversion}/?.so" "share/lua/${luaversion}/?.so" ];
|
||||||
|
@ -94,16 +99,16 @@ stdenv.mkDerivation rec {
|
||||||
lua = self;
|
lua = self;
|
||||||
inherit (luaPackages) requiredLuaModules;
|
inherit (luaPackages) requiredLuaModules;
|
||||||
};
|
};
|
||||||
withPackages = import ../lua-5/with-packages.nix { inherit buildEnv luaPackages;};
|
withPackages = import ../lua-5/with-packages.nix { inherit buildEnv luaPackages; };
|
||||||
pkgs = luaPackages;
|
pkgs = luaPackages;
|
||||||
interpreter = "${self}/bin/lua";
|
interpreter = "${self}/bin/lua";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "High-performance JIT compiler for Lua 5.1";
|
description = "High-performance JIT compiler for Lua 5.1";
|
||||||
homepage = "http://luajit.org";
|
homepage = "http://luajit.org";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
platforms = platforms.linux ++ platforms.darwin;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
maintainers = with maintainers; [ thoughtpolice smironov vcunat andir lblasc ];
|
maintainers = with maintainers; [ thoughtpolice smironov vcunat andir lblasc ];
|
||||||
} // extraMeta;
|
} // extraMeta;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue