summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/blurhash-python/default.nix
blob: bfb54d63f252a8f673168248dd179d036a331fd6 (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
43
44
45
46
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  cffi,
  pillow,
  pytestCheckHook,
  setuptools-scm,
  six,
}:

buildPythonPackage rec {
  pname = "blurhash-python";
  version = "1.2.2";

  pyproject = true;

  src = fetchFromGitHub {
    owner = "woltapp";
    repo = "blurhash-python";
    rev = "v${version}";
    hash = "sha256-Cz+PkPp1knvT3U5ofyb1PstM9kzBOkgPbx03LgOLXgw=";
  };

  nativeBuildInputs = [
    cffi
    setuptools-scm
  ];

  propagatedBuildInputs = [
    cffi
    pillow
    six
  ];

  pythonImportsCheck = [ "blurhash" ];

  nativeCheckInputs = [ pytestCheckHook ];

  meta = {
    description = "Compact representation of a placeholder for an image";
    homepage = "https://github.com/woltapp/blurhash-python";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}