1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6}:
7
8buildPythonPackage rec {
9 pname = "colour";
10 version = "0.1.5";
11 format = "setuptools";
12
13 src = fetchPypi {
14 inherit pname version;
15 hash = "sha256-ryASD+/Sr+3osAH77y6p2nCtfUn6/bZIkCXa6HRcOu4=";
16 };
17
18 patches = [
19 # https://github.com/vaab/colour/pull/66 (but does not merge cleanly)
20 ./remove-unmaintained-d2to1.diff
21 ];
22
23 nativeCheckInputs = [ pytestCheckHook ];
24
25 pytestFlags = [
26 "--doctest-glob=*.rst"
27 "--doctest-modules"
28 ];
29
30 pythonImportsCheck = [ "colour" ];
31
32 meta = with lib; {
33 description = "Converts and manipulates common color representation (RGB, HSV, web, ...)";
34 homepage = "https://github.com/vaab/colour";
35 license = licenses.bsd2;
36 };
37}