From a15ee4845bec7dd5dfe74971d23b788cb2d49885 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Wed, 25 Aug 2021 10:35:49 +0000 Subject: [PATCH] luajit: format with nixpkgs-fmt --- .../interpreters/luajit/default.nix | 47 ++++++++++--------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix index 860642b0fd2f..2a94f9f69e7c 100644 --- a/pkgs/development/interpreters/luajit/default.nix +++ b/pkgs/development/interpreters/luajit/default.nix @@ -1,13 +1,16 @@ -{ lib, stdenv, fetchFromGitHub, buildPackages +{ lib +, stdenv +, fetchFromGitHub +, buildPackages , name ? "luajit-${version}" , isStable , sha256 , rev , version -, extraMeta ? {} +, extraMeta ? { } , callPackage , self -, packageOverrides ? (self: super: {}) +, packageOverrides ? (self: super: { }) , enableFFI ? true , enableJIT ? true , enableJITDebugModule ? enableJIT @@ -24,25 +27,25 @@ assert enableJITDebugModule -> enableJIT; assert enableGDBJITSupport -> enableJIT; assert enableValgrindSupport -> valgrind != null; let - luaPackages = callPackage ../../lua-modules {lua=self; overrides=packageOverrides;}; + luaPackages = callPackage ../../lua-modules { lua = self; overrides = packageOverrides; }; XCFLAGS = with lib; - optional (!enableFFI) "-DLUAJIT_DISABLE_FFI" - ++ optional (!enableJIT) "-DLUAJIT_DISABLE_JIT" - ++ optional enable52Compat "-DLUAJIT_ENABLE_LUA52COMPAT" - ++ optional (!enableGC64) "-DLUAJIT_DISABLE_GC64" - ++ optional useSystemMalloc "-DLUAJIT_USE_SYSMALLOC" - ++ optional enableValgrindSupport "-DLUAJIT_USE_VALGRIND" - ++ optional enableGDBJITSupport "-DLUAJIT_USE_GDBJIT" - ++ optional enableAPICheck "-DLUAJIT_USE_APICHECK" - ++ optional enableVMAssertions "-DLUAJIT_USE_ASSERT" + optional (!enableFFI) "-DLUAJIT_DISABLE_FFI" + ++ optional (!enableJIT) "-DLUAJIT_DISABLE_JIT" + ++ optional enable52Compat "-DLUAJIT_ENABLE_LUA52COMPAT" + ++ optional (!enableGC64) "-DLUAJIT_DISABLE_GC64" + ++ optional useSystemMalloc "-DLUAJIT_USE_SYSMALLOC" + ++ optional enableValgrindSupport "-DLUAJIT_USE_VALGRIND" + ++ optional enableGDBJITSupport "-DLUAJIT_USE_GDBJIT" + ++ optional enableAPICheck "-DLUAJIT_USE_APICHECK" + ++ optional enableVMAssertions "-DLUAJIT_USE_ASSERT" ; in stdenv.mkDerivation rec { inherit name version; src = fetchFromGitHub { - owner = "LuaJIT"; - repo = "LuaJIT"; + owner = "LuaJIT"; + repo = "LuaJIT"; inherit sha256 rev; }; @@ -82,8 +85,10 @@ stdenv.mkDerivation rec { ''; LuaPathSearchPaths = [ - "lib/lua/${luaversion}/?.lua" "share/lua/${luaversion}/?.lua" - "share/lua/${luaversion}/?/init.lua" "lib/lua/${luaversion}/?/init.lua" + "lib/lua/${luaversion}/?.lua" + "share/lua/${luaversion}/?.lua" + "share/lua/${luaversion}/?/init.lua" + "lib/lua/${luaversion}/?/init.lua" "share/${name}/?.lua" ]; LuaCPathSearchPaths = [ "lib/lua/${luaversion}/?.so" "share/lua/${luaversion}/?.so" ]; @@ -94,16 +99,16 @@ stdenv.mkDerivation rec { lua = self; 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; interpreter = "${self}/bin/lua"; }; meta = with lib; { description = "High-performance JIT compiler for Lua 5.1"; - homepage = "http://luajit.org"; - license = licenses.mit; - platforms = platforms.linux ++ platforms.darwin; + homepage = "http://luajit.org"; + license = licenses.mit; + platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ thoughtpolice smironov vcunat andir lblasc ]; } // extraMeta; }