about summary refs log tree commit diff
path: root/pkgs/development/python-modules/colour/default.nix
blob: 2dd31a02bbe7748d4337d4211f06a021ac8d9763 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "colour";
  version = "0.1.5";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-ryASD+/Sr+3osAH77y6p2nCtfUn6/bZIkCXa6HRcOu4=";
  };

  patches = [
    # https://github.com/vaab/colour/pull/66 (but does not merge cleanly)
    ./remove-unmaintained-d2to1.diff
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pytestFlagsArray = [
    "--doctest-glob=\"*.rst\""
    "--doctest-modules"
  ];

  pythonImportsCheck = [
    "colour"
  ];

  meta = with lib; {
    description = "Converts and manipulates common color representation (RGB, HSV, web, ...)";
    homepage = "https://github.com/vaab/colour";
    license = licenses.bsd2;
  };
}