1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, gdal 5, h5py 6, noise 7, numpy 8, protobuf 9, purepng 10, pyplatec 11, six 12, isPy27 13, pytestCheckHook 14}: 15 16buildPythonPackage rec { 17 pname = "worldengine"; 18 version = "0.19.0"; 19 20 src = fetchFromGitHub { 21 owner = "Mindwerks"; 22 repo = "worldengine"; 23 rev = "v${version}"; 24 sha256 = "1xrckb0dn2841gvp32n18gib14bpi77hmjw3r9jiyhg402iip7ry"; 25 }; 26 27 src-data = fetchFromGitHub { 28 owner = "Mindwerks"; 29 repo = "worldengine-data"; 30 rev = "029051e"; 31 sha256 = "06xbf8gj3ljgr11v1n8jbs2q8pdf9wz53xdgkhpm8hdnjahgdxdm"; 32 }; 33 34 postUnpack = '' 35 ln -s ${src-data} worldengine-data 36 ''; 37 38 propagatedBuildInputs = [ 39 gdal 40 h5py 41 noise 42 numpy 43 protobuf 44 purepng 45 pyplatec 46 six 47 ]; 48 49 prePatch = '' 50 substituteInPlace setup.py \ 51 --replace pypng>=0.0.18 purepng \ 52 --replace 'numpy>=1.9.2, <= 1.10.0.post2' 'numpy' \ 53 --replace 'argparse==1.2.1' "" \ 54 --replace 'protobuf==3.0.0a3' 'protobuf' \ 55 --replace 'noise==1.2.2' 'noise' \ 56 --replace 'PyPlatec==1.4.0' 'PyPlatec' \ 57 58 substituteInPlace \ 59 worldengine/{draw.py,hdf5_serialization.py} \ 60 --replace numpy.float float 61 ''; 62 63 doCheck = !isPy27; # google namespace clash 64 nativeCheckInputs = [ pytestCheckHook ]; 65 66 disabledTests = [ 67 "TestSerialization" 68 ]; 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}