at master 913 B view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 curl, 6 cython, 7 expat, 8 libpng, 9 setuptools, 10 stdenv, 11 fixDarwinDylibNames, 12}: 13 14buildPythonPackage rec { 15 pname = "klayout"; 16 version = "0.30.4.post1"; 17 pyproject = true; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-jQLVD3IsekQfO0P80miKOtyTyGldc2Vn/mJFfvvgMFo="; 22 }; 23 24 build-system = [ 25 cython 26 setuptools 27 ]; 28 29 buildInputs = [ 30 curl 31 expat 32 libpng 33 ]; 34 35 # libpng-config is needed for the build on Darwin 36 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ 37 libpng.dev 38 fixDarwinDylibNames 39 ]; 40 41 pythonImportsCheck = [ "klayout" ]; 42 43 meta = with lib; { 44 description = "KLayouts Python API"; 45 homepage = "https://github.com/KLayout/klayout"; 46 license = licenses.gpl3Plus; 47 maintainers = with maintainers; [ fbeffa ]; 48 platforms = platforms.linux ++ platforms.darwin; 49 }; 50}