mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-13 21:56:29 +01:00
Without the chnage the eval fails:
$ nix-instantiate -A python3Packages.raylib-python-cffi.tests
error:
… from call site
at pkgs/development/python-modules/raylib-python-cffi/default.nix:52:20:
51|
52| passthru.tests = import ./passthru-tests.nix {
| ^
53| inherit writers;
error: function 'anonymous lambda' called without required argument 'src'
at pkgs/development/python-modules/raylib-python-cffi/passthru-tests.nix:1:1:
1| {
| ^
2| src,
27 lines
720 B
Nix
27 lines
720 B
Nix
{
|
|
raylib-python-cffi,
|
|
writers,
|
|
}:
|
|
let
|
|
src = raylib-python-cffi.src;
|
|
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"
|
|
'';
|
|
});
|
|
}
|