Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / glfw / default.nix
blobdb9f369a3497aa0df2510048eecb9a36fa1c2c2a
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , glfw3
5 , pythonOlder
6 }:
8 buildPythonPackage rec {
9   pname = "glfw";
10   version = "2.6.2";
11   format = "setuptools";
13   disabled = pythonOlder "3.7";
15   src = fetchFromGitHub {
16     owner = "FlorianRhiem";
17     repo = "pyGLFW";
18     rev = "refs/tags/v${version}";
19     hash = "sha256-3K+mDSz4ifVYkUvhd2XDPbhh6UCY4y54YqNLoAYDsP0=";
20   };
22   # Patch path to GLFW shared object
23   patches = [ ./search-path.patch ];
25   postPatch = ''
26     substituteInPlace glfw/library.py --replace "@GLFW@" '${glfw3}/lib'
27   '';
29   propagatedBuildInputs = [
30     glfw3
31   ];
33   # Project has no tests
34   doCheck = false;
36   pythonImportsCheck = [
37     "glfw"
38   ];
40   meta = with lib; {
41     description = "Python bindings for GLFW";
42     homepage = "https://github.com/FlorianRhiem/pyGLFW";
43     changelog = "https://github.com/FlorianRhiem/pyGLFW/blob/v${version}/CHANGELOG.md";
44     license = licenses.mit;
45     maintainers = [ maintainers.McSinyx ];
46   };