about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/blurhash-python/default.nix
blob: 2b0232a7e9b91b08b815d7fdc38d07211319f649 (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
41
42
43
44
45
46
47
48
49
50
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, cffi
, pillow
, pytestCheckHook
, setuptools-scm
, six
}:

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

  disabled = pythonOlder "3.8";

  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 ];
  };
}