tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python312Packages.raylib-python-cffi: add passthru tests
Sigmanificient
1 year ago
cb8f76c0
621b78be
+35
2 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
raylib-python-cffi
default.nix
passthru-tests.nix
+6
pkgs/development/python-modules/raylib-python-cffi/default.nix
reviewed
···
13
13
raygui,
14
14
darwin,
15
15
lib,
16
16
+
writers,
17
17
+
raylib-python-cffi,
16
18
}:
17
19
18
20
let
···
73
75
CoreFoundation
74
76
CoreVideo
75
77
];
78
78
+
79
79
+
passthru.tests = import ./passthru-tests.nix {
80
80
+
inherit src raylib-python-cffi writers;
81
81
+
};
76
82
77
83
meta = {
78
84
description = "Python CFFI bindings for Raylib";
+29
pkgs/development/python-modules/raylib-python-cffi/passthru-tests.nix
reviewed
···
1
1
+
{
2
2
+
src,
3
3
+
raylib-python-cffi,
4
4
+
writers,
5
5
+
}:
6
6
+
let
7
7
+
writeTest =
8
8
+
name: path:
9
9
+
writers.writePython3Bin name {
10
10
+
libraries = [ raylib-python-cffi ];
11
11
+
doCheck = false;
12
12
+
} (builtins.readFile (src + path));
13
13
+
14
14
+
in
15
15
+
{
16
16
+
basic_shapes = writeTest "basic_shapes" "/examples/shapes/shapes_basic_shapes.py";
17
17
+
18
18
+
cffi_binding =
19
19
+
(writeTest "cffi_binding" "/tests/test_static_with_only_api_from_dynamic.py").overrideAttrs
20
20
+
(prev: {
21
21
+
buildCommand =
22
22
+
prev.buildCommand
23
23
+
+ ''
24
24
+
substituteInPlace $out/bin/cffi_binding \
25
25
+
--replace-fail "examples/models/resources/heightmap.png" \
26
26
+
"${src}/examples/models/resources/heightmap.png"
27
27
+
'';
28
28
+
});
29
29
+
}