nixpkgs/pkgs/development/python-modules/glfw/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
954 B
Nix
Raw Normal View History

{
lib,
buildPythonPackage,
fetchFromGitHub,
glfw3,
pythonOlder,
}:
2021-09-10 09:22:52 +00:00
buildPythonPackage rec {
pname = "glfw";
2024-02-24 23:06:23 +00:00
version = "2.7.0";
format = "setuptools";
disabled = pythonOlder "3.7";
2021-09-10 09:22:52 +00:00
src = fetchFromGitHub {
owner = "FlorianRhiem";
repo = "pyGLFW";
2022-04-09 14:57:47 +00:00
rev = "refs/tags/v${version}";
2024-02-24 23:06:23 +00:00
hash = "sha256-9SNq8jKzgzFzonyMYoyjGbz4NDL83dPKWID9m3HZ7B8=";
2021-09-10 09:22:52 +00:00
};
# Patch path to GLFW shared object
postPatch = ''
2023-11-07 20:04:30 +00:00
substituteInPlace glfw/library.py --replace "_get_library_search_paths()," "[ '${glfw3}/lib' ],"
2021-09-10 09:22:52 +00:00
'';
propagatedBuildInputs = [ glfw3 ];
2021-09-10 09:22:52 +00:00
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "glfw" ];
2021-09-10 09:22:52 +00:00
meta = with lib; {
description = "Python bindings for GLFW";
homepage = "https://github.com/FlorianRhiem/pyGLFW";
changelog = "https://github.com/FlorianRhiem/pyGLFW/blob/v${version}/CHANGELOG.md";
2021-09-10 09:22:52 +00:00
license = licenses.mit;
maintainers = [ maintainers.McSinyx ];
};
}