2021-07-16 19:40:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-02-10 20:34:41 +00:00
|
|
|
, numpy
|
|
|
|
, pytestCheckHook
|
2021-07-16 19:40:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "opensimplex";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.4.3";
|
2021-07-16 19:40:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lmas";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "C/MTKTHjxMsOgzuXvokw039Kv6N/PgBoOqKleWPLpw0=";
|
2021-07-16 19:40:57 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
propagatedBuildInputs = [ numpy ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestFlagsArray = [ "tests/test_opensimplex.py" ];
|
2021-08-11 14:56:57 +00:00
|
|
|
pythonImportsCheck = [ "opensimplex" ];
|
2021-07-16 19:40:57 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "OpenSimplex Noise functions for 2D, 3D and 4D";
|
|
|
|
longDescription = ''
|
|
|
|
OpenSimplex noise is an n-dimensional gradient noise function that was
|
|
|
|
developed in order to overcome the patent-related issues surrounding
|
|
|
|
Simplex noise, while continuing to also avoid the visually-significant
|
|
|
|
directional artifacts characteristic of Perlin noise.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/lmas/opensimplex";
|
|
|
|
license = with licenses; [ mit ];
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with maintainers; [ emilytrau ];
|
2021-07-16 19:40:57 +00:00
|
|
|
};
|
|
|
|
}
|