summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/blurhash/default.nix
blob: 17e331f77e0c65f627b9ce53179dbd421b2718c7 (plain)
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
41
42
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytest-cov-stub,
  pytestCheckHook,
  pillow,
  numpy,
  setuptools,
}:

buildPythonPackage rec {
  pname = "blurhash";
  version = "1.1.5";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "halcy";
    repo = "blurhash-python";
    tag = "v${version}";
    hash = "sha256-lTPn2GTD7eQ9XkZyuttFqEvNgzcx6b7OdeMc5WOXrJs=";
  };

  build-system = [ setuptools ];

  nativeCheckInputs = [
    pytest-cov-stub
    pytestCheckHook
    pillow
    numpy
  ];

  pythonImportsCheck = [ "blurhash" ];

  meta = {
    changelog = "https://github.com/halcy/blurhash-python/releases/tag/${src.tag}";
    description = "Pure-Python implementation of the blurhash algorithm";
    homepage = "https://github.com/halcy/blurhash-python";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}