depot/third_party/nixpkgs/pkgs/development/python-modules/glfw/default.nix
Default email 893b09d324 Project import generated by Copybara.
GitOrigin-RevId: eac07edbd20ed4908b98790ba299250b5527ecdf
2021-12-24 12:21:11 +08:00

31 lines
783 B
Nix

{ lib, buildPythonPackage, fetchFromGitHub, glfw3 }:
buildPythonPackage rec {
pname = "glfw";
version = "2.5.0";
src = fetchFromGitHub {
owner = "FlorianRhiem";
repo = "pyGLFW";
rev = "v${version}";
sha256 = "15kk0zhhja0yqah09wzpg6912zd5bjmk84ab1n5nwryicpg44hqk";
};
# 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 ];
};
}