1{ fetchFromGitHub
2, lib
3, stdenv
4, cmake
5, lua
6}:
7stdenv.mkDerivation (finalAttrs: {
8 pname = "sol2";
9 version = "3.3.1";
10 src = fetchFromGitHub {
11 owner = "ThePhD";
12 repo = "sol2";
13 rev = "v${finalAttrs.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})