lol

luaPackages.toml: init at 0.3.0

+136 -1
+36
pkgs/development/libraries/sol2/default.nix
··· 1 + { fetchFromGitHub 2 + , lib 3 + , stdenv 4 + , cmake 5 + , lua 6 + }: 7 + stdenv.mkDerivation rec{ 8 + pname = "sol2"; 9 + version = "3.3.1"; 10 + src = fetchFromGitHub { 11 + owner = "ThePhD"; 12 + repo = "sol2"; 13 + rev = "v${version}"; 14 + hash = "sha256-7QHZRudxq3hdsfEAYKKJydc4rv6lyN6UIt/2Zmaejx8="; 15 + }; 16 + 17 + nativeBuildInputs = [ cmake lua ]; 18 + 19 + cmakeFlags = [ 20 + "-DSOL2_LUA_VERSION=${lua.version}" 21 + "-DSOL2_BUILD_LUA=FALSE" 22 + ]; 23 + 24 + meta = with lib;{ 25 + description = "Lua API wrapper with advanced features and top notch performance"; 26 + longDescription = '' 27 + sol2 is a C++ library binding to Lua. 28 + It currently supports all Lua versions 5.1+ (LuaJIT 2.0+ and MoonJIT included). 29 + sol2 aims to be easy to use and easy to add to a project. 30 + The library is header-only for easy integration with projects, and a single header can be used for drag-and-drop start up. 31 + ''; 32 + homepage = "https://github.com/ThePhD/sol2"; 33 + license = licenses.mit; 34 + maintainers = with maintainers; [ mrcjkb ]; 35 + }; 36 + }
+1 -1
pkgs/development/lua-modules/generated-packages.nix
··· 3098 3098 }; 3099 3099 }) {}; 3100 3100 3101 - vstruct = callPackage({ fetchgit, lua, buildLuarocksPackage, luaOlder, luarocks-build-rust-mlua}: 3101 + vstruct = callPackage({ fetchgit, lua, buildLuarocksPackage, luaOlder }: 3102 3102 buildLuarocksPackage { 3103 3103 pname = "vstruct"; 3104 3104 version = "2.1.1-1";
+52
pkgs/development/lua-modules/toml/default.nix
··· 1 + { lib 2 + , lua 3 + , luaOlder 4 + , fetchurl 5 + , fetchgit 6 + , buildLuarocksPackage 7 + , tomlplusplus 8 + , magic-enum 9 + , sol2 10 + }: 11 + buildLuarocksPackage { pname = "toml"; 12 + version = "0.3.0-0"; 13 + knownRockspec = (fetchurl { 14 + url = "mirror://luarocks/toml-0.3.0-0.rockspec"; 15 + sha256 = "0y4qdzsvf4xwnr49xcpbqclrq9d6snv83cbdkrchl0cn4cx6zpxy"; 16 + }).outPath; 17 + src = fetchgit ( removeAttrs (builtins.fromJSON ''{ 18 + "url": "https://github.com/LebJe/toml.lua.git", 19 + "rev": "319e9accf8c5cedf68795354ba81e54c817d1277", 20 + "date": "2023-02-19T23:00:49-05:00", 21 + "path": "/nix/store/p6a98sqp9a4jwsw6ghqcwpn9lxmhvkdg-toml.lua", 22 + "sha256": "05p33bq0ajl41vbsw9bx73shpf0p11n5gb6yy8asvp93zh2m51hq", 23 + "fetchLFS": false, 24 + "fetchSubmodules": true, 25 + "deepClone": false, 26 + "leaveDotGit": false 27 + } 28 + '') ["date" "path"]) ; 29 + 30 + patches = [ ./toml.patch ]; 31 + 32 + disabled = (luaOlder "5.1"); 33 + propagatedBuildInputs = [ 34 + lua 35 + magic-enum 36 + sol2 37 + ]; 38 + 39 + postPatch = '' 40 + substituteInPlace CMakeLists.txt --replace \ 41 + "TOML_PLUS_PLUS_SRC" \ 42 + "${tomlplusplus.src}" 43 + ''; 44 + 45 + meta = { 46 + homepage = "https://github.com/LebJe/toml.lua"; 47 + description = "TOML v1.0.0 parser and serializer for Lua. Powered by toml++."; 48 + maintainers = with lib.maintainers; [ mrcjkb ]; 49 + license.fullName = "MIT"; 50 + }; 51 + } 52 +
+43
pkgs/development/lua-modules/toml/toml.patch
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index ab3884c..9432df7 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -38,26 +38,17 @@ include(FetchContent) 6 + 7 + FetchContent_Declare( 8 + ${TOML++} 9 + - GIT_REPOSITORY "https://github.com/marzer/tomlplusplus.git" 10 + - GIT_SHALLOW ON 11 + - GIT_SUBMODULES "" 12 + - GIT_TAG "v3.3.0" 13 + + DOWNLOAD_COMMAND true 14 + ) 15 + 16 + FetchContent_Declare( 17 + ${SOL2} 18 + - GIT_REPOSITORY "https://github.com/ThePhD/sol2.git" 19 + - GIT_SHALLOW ON 20 + - GIT_SUBMODULES "" 21 + - GIT_TAG "v3.3.0" 22 + + DOWNLOAD_COMMAND true 23 + ) 24 + 25 + FetchContent_Declare( 26 + ${MAGIC_ENUM} 27 + - GIT_REPOSITORY "https://github.com/Neargye/magic_enum.git" 28 + - GIT_SHALLOW ON 29 + - GIT_SUBMODULES "" 30 + - GIT_TAG "v0.8.2" 31 + + DOWNLOAD_COMMAND true 32 + ) 33 + 34 + FetchContent_GetProperties(${TOML++}) 35 + @@ -113,7 +104,7 @@ if(NOT LUA_INCLUDE_DIR OR (WIN32 AND NOT LUA_LIBRARIES)) 36 + find_package(Lua) 37 + endif() 38 + 39 + -include_directories(${LUA_INCLUDE_DIR} src src/include ${${TOML++}_SOURCE_DIR} ${${SOL2}_SOURCE_DIR}/include ${${MAGIC_ENUM}_SOURCE_DIR}/include) 40 + +include_directories(${LUA_INCLUDE_DIR} src src/include TOML_PLUS_PLUS_SRC ${${SOL2}_SOURCE_DIR}/include ${${MAGIC_ENUM}_SOURCE_DIR}/include) 41 + 42 + set(SOURCES 43 + src/toml.cpp
+2
pkgs/top-level/all-packages.nix
··· 18018 18018 18019 18019 bundler-audit = callPackage ../tools/security/bundler-audit { }; 18020 18020 18021 + sol2 = callPackage ../development/libraries/sol2 { }; 18022 + 18021 18023 solargraph = rubyPackages.solargraph; 18022 18024 18023 18025 rbenv = callPackage ../development/ruby-modules/rbenv { };
+2
pkgs/top-level/lua-packages.nix
··· 138 138 inherit (pkgs.darwin.apple_sdk.frameworks) AppKit; 139 139 }; 140 140 141 + toml = callPackage ../development/lua-modules/toml { }; 142 + 141 143 toml-edit = callPackage ../development/lua-modules/toml-edit { }; 142 144 143 145 vicious = callPackage ({ fetchFromGitHub }: stdenv.mkDerivation rec {