| 
									
										
										
										
											2018-12-04 20:22:26 +03:00
										 |  |  | { lib, buildPythonPackage, fetchPypi, fontconfig, python, cython, freefont_ttf, makeFontsConf }: | 
					
						
							| 
									
										
										
										
											2017-10-19 13:35:09 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | let | 
					
						
							|  |  |  |   fontsConf = makeFontsConf { | 
					
						
							|  |  |  |     fontDirectories = [ freefont_ttf ]; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | in buildPythonPackage rec { | 
					
						
							|  |  |  |   pname = "Python-fontconfig"; | 
					
						
							|  |  |  |   version = "0.5.1"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   src = fetchPypi { | 
					
						
							|  |  |  |     inherit pname version; | 
					
						
							|  |  |  |     sha256 = "154rfd0ygcbj9y8m32n537b457yijpfx9dvmf76vi0rg4ikf7kxp"; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   buildInputs = [ fontconfig ]; | 
					
						
							| 
									
										
										
										
											2018-12-04 20:22:26 +03:00
										 |  |  |   nativeBuildInputs = [ cython ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   preBuild = ''
 | 
					
						
							|  |  |  |     ${python.interpreter} setup.py build_ext -i | 
					
						
							|  |  |  |   '';
 | 
					
						
							| 
									
										
										
										
											2017-10-19 13:35:09 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  |   checkPhase = ''
 | 
					
						
							|  |  |  |     export FONTCONFIG_FILE=${fontsConf}; | 
					
						
							|  |  |  |     echo y | ${python.interpreter} test/test.py | 
					
						
							|  |  |  |   '';
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   meta = { | 
					
						
							| 
									
										
										
										
											2020-03-31 21:11:51 -04:00
										 |  |  |     homepage = "https://github.com/Vayn/python-fontconfig"; | 
					
						
							| 
									
										
										
										
											2017-10-19 13:35:09 +03:00
										 |  |  |     description = "Python binding for Fontconfig"; | 
					
						
							|  |  |  |     license = lib.licenses.gpl3; | 
					
						
							|  |  |  |     maintainers = with lib.maintainers; [ gnidorah ]; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } |