Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / worldengine / default.nix
blob13ce4bc873d622972032ca0e9f528c67d550d3a1
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , isPy27
5 , fetchFromGitHub
6 , noise
7 , numpy
8 , pyplatec
9 , protobuf
10 , purepng
11 , h5py
12 , gdal
13 , pytestCheckHook
16 buildPythonPackage rec {
17   pname = "worldengine";
18   version = "0.19.0";
20   src = fetchFromGitHub {
21     owner = "Mindwerks";
22     repo = "worldengine";
23     rev = "v${version}";
24     sha256 = "1xrckb0dn2841gvp32n18gib14bpi77hmjw3r9jiyhg402iip7ry";
25   };
27   src-data = fetchFromGitHub {
28     owner = "Mindwerks";
29     repo = "worldengine-data";
30     rev = "029051e";
31     sha256 = "06xbf8gj3ljgr11v1n8jbs2q8pdf9wz53xdgkhpm8hdnjahgdxdm";
32   };
34   postUnpack = ''
35     ln -s ${src-data} worldengine-data
36   '';
38   propagatedBuildInputs = [ noise numpy pyplatec protobuf purepng h5py gdal ];
40   prePatch = ''
41     substituteInPlace setup.py \
42       --replace pypng>=0.0.18 purepng \
43       --replace 'numpy>=1.9.2, <= 1.10.0.post2' 'numpy' \
44       --replace 'argparse==1.2.1' "" \
45       --replace 'protobuf==3.0.0a3' 'protobuf' \
46       --replace 'noise==1.2.2' 'noise' \
47       --replace 'PyPlatec==1.4.0' 'PyPlatec' \
48   '';
50   doCheck = !isPy27; # google namespace clash
51   checkInputs = [ pytestCheckHook ];
53   disabledTests = [
54     "TestSerialization"
55   ];
57   meta = with lib; {
58     homepage = "http://world-engine.org";
59     description = "World generator using simulation of plates, rain shadow, erosion, etc";
60     license = licenses.mit;
61     maintainers = with maintainers; [ rardiol ];
62   };