blob: 4dd6aa9b6dd64bd77c34fd964e0802a9505150da (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
{
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;
};
}
|