Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 63 lines 1.6 kB view raw
1{ stdenv 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, nose 6, noise 7, numpy 8, pyplatec 9, protobuf 10, purepng 11, h5py 12, gdal 13}: 14 15buildPythonPackage rec { 16 pname = "worldengine"; 17 version = "0.19.0"; 18 19 src = fetchFromGitHub { 20 owner = "Mindwerks"; 21 repo = "worldengine"; 22 rev = "v${version}"; 23 sha256 = "1xrckb0dn2841gvp32n18gib14bpi77hmjw3r9jiyhg402iip7ry"; 24 }; 25 26 src-data = fetchFromGitHub { 27 owner = "Mindwerks"; 28 repo = "worldengine-data"; 29 rev = "029051e"; 30 sha256 = "06xbf8gj3ljgr11v1n8jbs2q8pdf9wz53xdgkhpm8hdnjahgdxdm"; 31 }; 32 33 postUnpack = '' 34 ln -s ${src-data} worldengine-data 35 ''; 36 37 propagatedBuildInputs = [ noise numpy pyplatec protobuf purepng h5py gdal ]; 38 39 prePatch = '' 40 substituteInPlace setup.py \ 41 --replace pypng>=0.0.18 purepng \ 42 --replace 'numpy>=1.9.2, <= 1.10.0.post2' 'numpy' \ 43 --replace 'argparse==1.2.1' "" \ 44 --replace 'protobuf==3.0.0a3' 'protobuf' \ 45 --replace 'noise==1.2.2' 'noise' \ 46 --replace 'PyPlatec==1.4.0' 'PyPlatec' \ 47 ''; 48 49 # with python<3.5, unittest fails to discover tests because of their filenames 50 # so nose is used instead. 51 checkInputs = stdenv.lib.optional (pythonOlder "3.5") [ nose ]; 52 postCheck = stdenv.lib.optionalString (pythonOlder "3.5") '' 53 nosetests tests 54 ''; 55 56 meta = with stdenv.lib; { 57 homepage = http://world-engine.org; 58 description = "World generator using simulation of plates, rain shadow, erosion, etc"; 59 license = licenses.mit; 60 maintainers = with maintainers; [ rardiol ]; 61 }; 62 63}