1{
2 lib,
3 stdenv,
4 meson,
5 ninja,
6 fetchFromGitLab,
7 gperf,
8 gawk,
9 gitUpdater,
10 pkg-config,
11 boost,
12 luajit_openresty,
13 asciidoctor,
14 libsForQt5,
15 emilua,
16 liburing,
17 fmt,
18 runCommand,
19 xvfb-run,
20 qt5, # this
21}:
22
23stdenv.mkDerivation rec {
24 pname = "emilua-qt5";
25 version = "1.0.2";
26
27 src = fetchFromGitLab {
28 owner = "emilua";
29 repo = "qt5";
30 rev = "v${version}";
31 hash = "sha256-9w9E0RWwW3scbmOOXdOXj22LR65a6XBHDkC8eimAfUs=";
32 };
33
34 buildInputs = [
35 luajit_openresty
36 boost
37 libsForQt5.qtdeclarative
38 emilua
39 liburing
40 fmt
41 libsForQt5.qtbase
42 ];
43
44 nativeBuildInputs = [
45 gperf
46 gawk
47 pkg-config
48 asciidoctor
49 meson
50 ninja
51 libsForQt5.wrapQtAppsHook
52 libsForQt5.qttools
53 ];
54
55 passthru = {
56 updateScript = gitUpdater { rev-prefix = "v"; };
57 tests.basic =
58 runCommand "test-basic-qt5"
59 {
60 buildInputs = [
61 emilua
62 qt5
63 libsForQt5.wrapQtAppsHook
64 xvfb-run
65 ];
66 dontWrapQtApps = true;
67 }
68 ''
69 makeWrapper ${lib.getExe emilua} payload \
70 ''${qtWrapperArgs[@]} \
71 --add-flags ${./basic_test.lua}
72 xvfb-run ./payload
73 touch $out
74 '';
75 };
76
77 meta = with lib; {
78 description = "Qt5 bindings for Emilua";
79 homepage = "https://emilua.org/";
80 license = licenses.boost;
81 maintainers = with maintainers; [
82 manipuladordedados
83 lucasew
84 ];
85 platforms = platforms.linux;
86 };
87}