1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 gdal, 6 h5py, 7 noise, 8 numpy, 9 protobuf, 10 purepng, 11 pyplatec, 12 six, 13 isPy27, 14 pytestCheckHook, 15}: 16 17buildPythonPackage rec { 18 pname = "worldengine"; 19 version = "0.19.0"; 20 format = "setuptools"; 21 22 src = fetchFromGitHub { 23 owner = "Mindwerks"; 24 repo = "worldengine"; 25 rev = "v${version}"; 26 sha256 = "1xrckb0dn2841gvp32n18gib14bpi77hmjw3r9jiyhg402iip7ry"; 27 }; 28 29 src-data = fetchFromGitHub { 30 owner = "Mindwerks"; 31 repo = "worldengine-data"; 32 rev = "029051e707f4702cb2af1a23b8222cca7dc88930"; 33 sha256 = "06xbf8gj3ljgr11v1n8jbs2q8pdf9wz53xdgkhpm8hdnjahgdxdm"; 34 }; 35 36 postUnpack = '' 37 ln -s ${src-data} worldengine-data 38 ''; 39 40 propagatedBuildInputs = [ 41 gdal 42 h5py 43 noise 44 numpy 45 protobuf 46 purepng 47 pyplatec 48 six 49 ]; 50 51 prePatch = '' 52 substituteInPlace setup.py \ 53 --replace pypng>=0.0.18 purepng \ 54 --replace 'numpy>=1.9.2, <= 1.10.0.post2' 'numpy' \ 55 --replace 'argparse==1.2.1' "" \ 56 --replace 'protobuf==3.0.0a3' 'protobuf' \ 57 --replace 'noise==1.2.2' 'noise' \ 58 --replace 'PyPlatec==1.4.0' 'PyPlatec' \ 59 60 substituteInPlace \ 61 worldengine/{draw.py,hdf5_serialization.py} \ 62 --replace numpy.float float 63 ''; 64 65 doCheck = !isPy27; # google namespace clash 66 nativeCheckInputs = [ pytestCheckHook ]; 67 68 disabledTests = [ "TestSerialization" ]; 69 70 meta = with lib; { 71 broken = true; 72 homepage = "https://github.com/mindwerks/worldengine"; 73 description = "World generator using simulation of plates, rain shadow, erosion, etc"; 74 license = licenses.mit; 75 maintainers = with maintainers; [ rardiol ]; 76 }; 77}