2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-05-24 13:37:59 +00:00
|
|
|
, gdal
|
|
|
|
, h5py
|
2020-04-24 23:36:52 +00:00
|
|
|
, noise
|
|
|
|
, numpy
|
|
|
|
, protobuf
|
|
|
|
, purepng
|
2023-05-24 13:37:59 +00:00
|
|
|
, pyplatec
|
|
|
|
, six
|
|
|
|
, isPy27
|
2021-01-15 22:18:51 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "worldengine";
|
|
|
|
version = "0.19.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mindwerks";
|
|
|
|
repo = "worldengine";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1xrckb0dn2841gvp32n18gib14bpi77hmjw3r9jiyhg402iip7ry";
|
|
|
|
};
|
|
|
|
|
|
|
|
src-data = fetchFromGitHub {
|
|
|
|
owner = "Mindwerks";
|
|
|
|
repo = "worldengine-data";
|
|
|
|
rev = "029051e";
|
|
|
|
sha256 = "06xbf8gj3ljgr11v1n8jbs2q8pdf9wz53xdgkhpm8hdnjahgdxdm";
|
|
|
|
};
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
ln -s ${src-data} worldengine-data
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
gdal
|
|
|
|
h5py
|
|
|
|
noise
|
|
|
|
numpy
|
|
|
|
protobuf
|
|
|
|
purepng
|
|
|
|
pyplatec
|
|
|
|
six
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace pypng>=0.0.18 purepng \
|
|
|
|
--replace 'numpy>=1.9.2, <= 1.10.0.post2' 'numpy' \
|
|
|
|
--replace 'argparse==1.2.1' "" \
|
|
|
|
--replace 'protobuf==3.0.0a3' 'protobuf' \
|
|
|
|
--replace 'noise==1.2.2' 'noise' \
|
|
|
|
--replace 'PyPlatec==1.4.0' 'PyPlatec' \
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
substituteInPlace \
|
|
|
|
worldengine/{draw.py,hdf5_serialization.py} \
|
|
|
|
--replace numpy.float float
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = !isPy27; # google namespace clash
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"TestSerialization"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-10-09 19:29:22 +00:00
|
|
|
broken = true;
|
2023-08-22 20:05:09 +00:00
|
|
|
homepage = "https://github.com/mindwerks/worldengine";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "World generator using simulation of plates, rain shadow, erosion, etc";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ rardiol ];
|
|
|
|
};
|
|
|
|
}
|