mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
emiluaPlugins.qt5: init at 1.0.1
Signed-off-by: lucasew <lucas59356@gmail.com>
This commit is contained in:
parent
54dc5d189a
commit
6f3735f382
12
pkgs/development/emilua-plugins/qt5/basic_test.lua
Normal file
12
pkgs/development/emilua-plugins/qt5/basic_test.lua
Normal file
@ -0,0 +1,12 @@
|
||||
local qt = require 'qt5'
|
||||
local qml = qt.load_qml(byte_span.append([[
|
||||
import QtQml 2.0
|
||||
QtObject {
|
||||
function foobar(a: int, b: int): int {
|
||||
return a + b
|
||||
}
|
||||
}
|
||||
]]))
|
||||
assert(qml.object('foobar(int,int)', 1, 2), 3)
|
||||
|
||||
print("done 👍")
|
87
pkgs/development/emilua-plugins/qt5/default.nix
Normal file
87
pkgs/development/emilua-plugins/qt5/default.nix
Normal file
@ -0,0 +1,87 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
meson,
|
||||
ninja,
|
||||
fetchFromGitLab,
|
||||
gperf,
|
||||
gawk,
|
||||
gitUpdater,
|
||||
pkg-config,
|
||||
boost,
|
||||
luajit_openresty,
|
||||
asciidoctor,
|
||||
libsForQt5,
|
||||
emilua,
|
||||
liburing,
|
||||
fmt,
|
||||
runCommand,
|
||||
xvfb-run,
|
||||
qt5, # this
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "emilua-qt5";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "emilua";
|
||||
repo = "qt5";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-FkBfzGzUX7dvHjWRBjVwppU4jZBbY02gP+fIta8mjIw=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
luajit_openresty
|
||||
boost
|
||||
libsForQt5.qtdeclarative
|
||||
emilua
|
||||
liburing
|
||||
fmt
|
||||
libsForQt5.qtbase
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
gperf
|
||||
gawk
|
||||
pkg-config
|
||||
asciidoctor
|
||||
meson
|
||||
ninja
|
||||
libsForQt5.wrapQtAppsHook
|
||||
libsForQt5.qttools
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = gitUpdater { rev-prefix = "v"; };
|
||||
tests.basic =
|
||||
runCommand "test-basic-qt5"
|
||||
{
|
||||
buildInputs = [
|
||||
emilua
|
||||
qt5
|
||||
libsForQt5.wrapQtAppsHook
|
||||
xvfb-run
|
||||
];
|
||||
dontWrapQtApps = true;
|
||||
}
|
||||
''
|
||||
makeWrapper ${lib.getExe emilua} payload \
|
||||
''${qtWrapperArgs[@]} \
|
||||
--add-flags ${./basic_test.lua}
|
||||
xvfb-run ./payload
|
||||
touch $out
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Qt5 bindings for Emilua";
|
||||
homepage = "https://emilua.org/";
|
||||
license = licenses.boost;
|
||||
maintainers = with maintainers; [
|
||||
manipuladordedados
|
||||
lucasew
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -9,4 +9,5 @@ emilua:
|
||||
(lib.makeScope newScope (self: {
|
||||
inherit emilua;
|
||||
beast = self.callPackage ../development/emilua-plugins/beast { };
|
||||
qt5 = self.callPackage ../development/emilua-plugins/qt5 { };
|
||||
}))
|
||||
|
Loading…
Reference in New Issue
Block a user