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