1{
2 buildPythonPackage,
3 cffi,
4 fetchFromGitHub,
5 inflection,
6 jinja2,
7 lib,
8 pysdl2,
9 setuptools,
10 vulkan-loader,
11 wheel,
12 xmltodict,
13}:
14
15buildPythonPackage rec {
16 pname = "vulkan";
17 version = "1.3.275.1";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "realitix";
22 repo = "vulkan";
23 tag = version;
24 hash = "sha256-b1jHNKdHF7pIC6H4O2yxy36Ppb60J0uN2P0WaCw51Gc=";
25 };
26
27 postPatch = ''
28 substituteInPlace vulkan/_vulkan.py \
29 --replace-fail 'lib = ffi.dlopen(name)' 'lib = ffi.dlopen("${vulkan-loader}/lib/" + name)'
30 '';
31
32 buildInputs = [
33 vulkan-loader
34 ];
35
36 build-system = [
37 setuptools
38 wheel
39 ];
40
41 dependencies = [
42 inflection
43 jinja2
44 pysdl2
45 xmltodict
46 cffi
47 ];
48
49 pythonImportsCheck = [
50 "vulkan"
51 ];
52
53 meta = {
54 description = "Ultimate Python binding for Vulkan API";
55 homepage = "https://github.com/realitix/vulkan";
56 license = lib.licenses.asl20;
57 platforms = lib.platforms.linux;
58 maintainers = with lib.maintainers; [
59 grimmauld
60 getchoo
61 ];
62 };
63}