2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchFromGitLab
|
|
|
|
, re2c
|
|
|
|
, gperf
|
|
|
|
, gawk
|
|
|
|
, pkg-config
|
|
|
|
, boost182
|
|
|
|
, fmt
|
|
|
|
, luajit_openresty
|
|
|
|
, ncurses
|
|
|
|
, serd
|
|
|
|
, sord
|
|
|
|
, libcap
|
|
|
|
, liburing
|
|
|
|
, openssl
|
2024-01-02 11:29:13 +00:00
|
|
|
, cereal
|
|
|
|
, cmake
|
2023-10-09 19:29:22 +00:00
|
|
|
, asciidoctor
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
trial-protocol-wrap = fetchFromGitHub {
|
|
|
|
owner = "breese";
|
|
|
|
repo = "trial.protocol";
|
|
|
|
rev = "79149f604a49b8dfec57857ca28aaf508069b669";
|
|
|
|
name = "trial-protocol";
|
|
|
|
hash = "sha256-Xd8bX3z9PZWU17N9R95HXdj6qo9at5FBL/+PTVaJgkw=";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "emilua";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "0.6.0";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "emilua";
|
|
|
|
repo = "emilua";
|
|
|
|
rev = "v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-cW2b+jUQT60hCCirBzxZltzA7KvBihnzWNPkKDID6kU=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
luajit_openresty
|
|
|
|
boost182
|
|
|
|
fmt
|
|
|
|
ncurses
|
|
|
|
serd
|
|
|
|
sord
|
|
|
|
libcap
|
|
|
|
liburing
|
|
|
|
openssl
|
2024-01-02 11:29:13 +00:00
|
|
|
cereal
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
re2c
|
|
|
|
gperf
|
|
|
|
gawk
|
|
|
|
pkg-config
|
|
|
|
asciidoctor
|
|
|
|
meson
|
2024-01-02 11:29:13 +00:00
|
|
|
cmake
|
2023-10-09 19:29:22 +00:00
|
|
|
ninja
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# Meson is no longer able to pick up Boost automatically.
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/86131
|
|
|
|
env = {
|
|
|
|
BOOST_INCLUDEDIR = "${lib.getDev boost182}/include";
|
|
|
|
BOOST_LIBRARYDIR = "${lib.getLib boost182}/lib";
|
|
|
|
};
|
|
|
|
|
|
|
|
mesonFlags = [
|
2024-01-02 11:29:13 +00:00
|
|
|
(lib.mesonBool "enable_file_io" true)
|
|
|
|
(lib.mesonBool "enable_io_uring" true)
|
|
|
|
(lib.mesonBool "enable_tests" true)
|
|
|
|
(lib.mesonBool "enable_manpages" true)
|
2024-01-13 08:15:51 +00:00
|
|
|
(lib.mesonOption "version_suffix" "-nixpkgs1")
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
pushd subprojects
|
|
|
|
cp -r ${trial-protocol-wrap} trial-protocol
|
2024-01-13 08:15:51 +00:00
|
|
|
chmod +w trial-protocol
|
2023-10-09 19:29:22 +00:00
|
|
|
cp "packagefiles/trial.protocol/meson.build" "trial-protocol/"
|
|
|
|
popd
|
|
|
|
|
|
|
|
substituteInPlace src/emilua_gperf.awk --replace '#!/usr/bin/env -S gawk --file' '#!${gawk}/bin/gawk -f'
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Lua execution engine";
|
|
|
|
homepage = "https://emilua.org/";
|
|
|
|
license = licenses.boost;
|
|
|
|
maintainers = with maintainers; [ manipuladordedados ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|