python312Packages.raylib-python-cffi: add passthru tests
This commit is contained in:
parent
621b78be6b
commit
cb8f76c0e4
@ -13,6 +13,8 @@
|
||||
raygui,
|
||||
darwin,
|
||||
lib,
|
||||
writers,
|
||||
raylib-python-cffi,
|
||||
}:
|
||||
|
||||
let
|
||||
@ -74,6 +76,10 @@ buildPythonPackage rec {
|
||||
CoreVideo
|
||||
];
|
||||
|
||||
passthru.tests = import ./passthru-tests.nix {
|
||||
inherit src raylib-python-cffi writers;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Python CFFI bindings for Raylib";
|
||||
homepage = "https://electronstudio.github.io/raylib-python-cffi";
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
{
|
||||
src,
|
||||
raylib-python-cffi,
|
||||
writers,
|
||||
}:
|
||||
let
|
||||
writeTest =
|
||||
name: path:
|
||||
writers.writePython3Bin name {
|
||||
libraries = [ raylib-python-cffi ];
|
||||
doCheck = false;
|
||||
} (builtins.readFile (src + path));
|
||||
|
||||
in
|
||||
{
|
||||
basic_shapes = writeTest "basic_shapes" "/examples/shapes/shapes_basic_shapes.py";
|
||||
|
||||
cffi_binding =
|
||||
(writeTest "cffi_binding" "/tests/test_static_with_only_api_from_dynamic.py").overrideAttrs
|
||||
(prev: {
|
||||
buildCommand =
|
||||
prev.buildCommand
|
||||
+ ''
|
||||
substituteInPlace $out/bin/cffi_binding \
|
||||
--replace-fail "examples/models/resources/heightmap.png" \
|
||||
"${src}/examples/models/resources/heightmap.png"
|
||||
'';
|
||||
});
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user