depot/third_party/nixpkgs/pkgs/development/python-modules/pyftgl/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

51 lines
954 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
stdenv,
boost,
freetype,
ftgl,
libGLU,
libGL,
python,
}:
let
pythonVersion = with lib.versions; "${major python.version}${minor python.version}";
in
buildPythonPackage rec {
pname = "pyftgl";
version = "0.4b";
format = "setuptools";
src = fetchFromGitHub {
owner = "umlaeute";
repo = "${pname}-${version}";
rev = version;
sha256 = "12zcjv4cwwjihiaf74kslrdmmk4bs47h7006gyqfwdfchfjdgg4r";
};
postPatch = ''
sed -i "s,'boost_python','boost_python${pythonVersion}',g" setup.py
'';
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
NIX_CFLAGS_COMPILE = "-L${libGL}/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries";
};
buildInputs = [
boost
freetype
ftgl
libGLU
libGL
];
meta = with lib; {
description = "Python bindings for FTGL (FreeType for OpenGL)";
license = licenses.gpl2Plus;
};
}