1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 glfw3,
6 pythonOlder,
7}:
8
9buildPythonPackage rec {
10 pname = "glfw";
11 version = "2.10.0";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "FlorianRhiem";
18 repo = "pyGLFW";
19 tag = "v${version}";
20 hash = "sha256-jZdM/rvPseQUsRv8+P3To2VCrQUiDHqr6XuXEBW0otM=";
21 };
22
23 # Patch path to GLFW shared object
24 postPatch = ''
25 substituteInPlace glfw/library.py --replace "_get_library_search_paths()," "[ '${glfw3}/lib' ],"
26 '';
27
28 propagatedBuildInputs = [ glfw3 ];
29
30 # Project has no tests
31 doCheck = false;
32
33 pythonImportsCheck = [ "glfw" ];
34
35 meta = with lib; {
36 description = "Python bindings for GLFW";
37 homepage = "https://github.com/FlorianRhiem/pyGLFW";
38 changelog = "https://github.com/FlorianRhiem/pyGLFW/blob/${src.tag}/CHANGELOG.md";
39 license = licenses.mit;
40 maintainers = [ maintainers.McSinyx ];
41 };
42}