depot/third_party/nixpkgs/pkgs/development/python-modules/glfw/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

47 lines
968 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, glfw3
, pythonOlder
}:
buildPythonPackage rec {
pname = "glfw";
version = "2.6.2";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "FlorianRhiem";
repo = "pyGLFW";
rev = "refs/tags/v${version}";
hash = "sha256-3K+mDSz4ifVYkUvhd2XDPbhh6UCY4y54YqNLoAYDsP0=";
};
# 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";
changelog = "https://github.com/FlorianRhiem/pyGLFW/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = [ maintainers.McSinyx ];
};
}