1{
2 gcc,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 cffi,
7 pkg-config,
8 glfw,
9 libffi,
10 raylib,
11 physac,
12 raygui,
13 lib,
14 writers,
15 raylib-python-cffi,
16}:
17
18buildPythonPackage rec {
19 pname = "raylib-python-cffi";
20 version = "5.5.0.2";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "electronstudio";
25 repo = "raylib-python-cffi";
26 tag = "v${version}";
27 hash = "sha256-Ls+9+iByGQJQJdJiW4WOmKPGbrWJDisXZ1ZYqvAj+3o=";
28 };
29
30 build-system = [ setuptools ];
31 dependencies = [ cffi ];
32
33 patches = [
34 # This patch fixes to the builder script function to call pkg-config
35 # using the library name rather than searching only through raylib
36 ./fix_pyray_builder.patch
37
38 # use get_lib_flags() instead of linking to libraylib.a directly
39 ./fix_macos_raylib.patch
40 ];
41
42 nativeBuildInputs = [
43 pkg-config
44 gcc
45 ];
46
47 # tests require a graphic environment
48 doCheck = false;
49
50 pythonImportsCheck = [ "pyray" ];
51
52 buildInputs = [
53 glfw
54 libffi
55 raylib
56 physac
57 raygui
58 ];
59
60 passthru.tests = import ./passthru-tests.nix {
61 inherit src raylib-python-cffi writers;
62 };
63
64 meta = {
65 description = "Python CFFI bindings for Raylib";
66 homepage = "https://electronstudio.github.io/raylib-python-cffi";
67 license = lib.licenses.epl20;
68 maintainers = with lib.maintainers; [ sigmanificient ];
69 };
70}