1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 numpy,
6 pytestCheckHook,
7}:
8
9buildPythonPackage rec {
10 pname = "opensimplex";
11 version = "0.4.5";
12 format = "setuptools";
13
14 src = fetchFromGitHub {
15 owner = "lmas";
16 repo = "opensimplex";
17 rev = "v${version}";
18 sha256 = "sha256-pxPak0H6Rh9KwhIsrnMvBFm1uF5XKb4B3H9cN6DM0g4=";
19 };
20
21 propagatedBuildInputs = [ numpy ];
22
23 nativeCheckInputs = [ pytestCheckHook ];
24 enabledTestPaths = [ "tests/test_opensimplex.py" ];
25 pythonImportsCheck = [ "opensimplex" ];
26
27 meta = with lib; {
28 description = "OpenSimplex Noise functions for 2D, 3D and 4D";
29 longDescription = ''
30 OpenSimplex noise is an n-dimensional gradient noise function that was
31 developed in order to overcome the patent-related issues surrounding
32 Simplex noise, while continuing to also avoid the visually-significant
33 directional artifacts characteristic of Perlin noise.
34 '';
35 homepage = "https://github.com/lmas/opensimplex";
36 license = with licenses; [ mit ];
37 maintainers = with maintainers; [ emilytrau ];
38 };
39}