1{ stdenv, buildPythonPackage, fetchFromGitHub
2, matplotlib
3, mock
4, numpy
5, pillow
6, pytest
7, pytestcov
8}:
9
10buildPythonPackage rec {
11 pname = "word_cloud";
12 version = "1.6.0";
13
14 # tests are not included in pypi tarball
15 src = fetchFromGitHub {
16 owner = "amueller";
17 repo = pname;
18 rev = version;
19 sha256 = "1ncjr90m3w3b4zi23kw6ai11gxahdyah96x8jb2yn2x4573022x2";
20 };
21
22 propagatedBuildInputs = [ matplotlib numpy pillow ];
23
24 # Tests require extra dependencies
25 checkInputs = [ mock pytest pytestcov ];
26 # skip tests which make assumptions about installation
27 checkPhase = ''
28 pytest -k 'not cli_as_executable'
29 '';
30
31 meta = with stdenv.lib; {
32 description = "A little word cloud generator in Python";
33 homepage = "https://github.com/amueller/word_cloud";
34 license = licenses.mit;
35 maintainers = with maintainers; [ jm2dev ];
36 };
37}