pythonPackages.glfw: init at 2.2.0
This commit is contained in:
parent
870959c7fb
commit
3e10c97c85
31
pkgs/development/python-modules/glfw/default.nix
Normal file
31
pkgs/development/python-modules/glfw/default.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ lib, buildPythonPackage, fetchFromGitHub, glfw3 }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "glfw";
|
||||
version = "2.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FlorianRhiem";
|
||||
repo = "pyGLFW";
|
||||
rev = "v${version}";
|
||||
sha256 = "1ygcwnh0x07yi87wkxykw566g74vfi8n0w2rzypidhdss14x3pvf";
|
||||
};
|
||||
|
||||
# Patch path to GLFW shared object
|
||||
patches = [ ./search-path.patch ];
|
||||
postPatch = ''
|
||||
substituteInPlace glfw/library.py --replace "@GLFW@" '${glfw3}/lib'
|
||||
'';
|
||||
propagatedBuildInputs = [ glfw3 ];
|
||||
|
||||
# Project has no tests
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "glfw" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python bindings for GLFW";
|
||||
homepage = "https://github.com/FlorianRhiem/pyGLFW";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.McSinyx ];
|
||||
};
|
||||
}
|
11
pkgs/development/python-modules/glfw/search-path.patch
Normal file
11
pkgs/development/python-modules/glfw/search-path.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff --git a/glfw/library.py b/glfw/library.py
|
||||
index 20387e1..9bdd62a 100644
|
||||
--- a/glfw/library.py
|
||||
+++ b/glfw/library.py
|
||||
@@ -189,5 +189,4 @@ elif sys.platform == 'win32':
|
||||
except OSError:
|
||||
pass
|
||||
else:
|
||||
- glfw = _load_library(['glfw', 'glfw3'], ['.so', '.dylib'],
|
||||
- _get_library_search_paths(), _glfw_get_version)
|
||||
+ glfw = _load_library(['glfw', 'glfw3'], ['.so', '.dylib'], ['@GLFW@'], _glfw_get_version)
|
@ -2951,6 +2951,8 @@ in {
|
||||
|
||||
glcontext = callPackage ../development/python-modules/glcontext { };
|
||||
|
||||
glfw = callPackage ../development/python-modules/glfw { };
|
||||
|
||||
glob2 = callPackage ../development/python-modules/glob2 { };
|
||||
|
||||
globre = callPackage ../development/python-modules/globre { };
|
||||
|
Loading…
Reference in New Issue
Block a user