1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 cffi,
7 pillow,
8 pytestCheckHook,
9 setuptools-scm,
10 six,
11}:
12
13buildPythonPackage rec {
14 pname = "blurhash-python";
15 version = "1.2.2";
16
17 disabled = pythonOlder "3.8";
18
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "woltapp";
23 repo = "blurhash-python";
24 rev = "v${version}";
25 hash = "sha256-Cz+PkPp1knvT3U5ofyb1PstM9kzBOkgPbx03LgOLXgw=";
26 };
27
28 nativeBuildInputs = [
29 cffi
30 setuptools-scm
31 ];
32
33 propagatedBuildInputs = [
34 cffi
35 pillow
36 six
37 ];
38
39 pythonImportsCheck = [ "blurhash" ];
40
41 nativeCheckInputs = [ pytestCheckHook ];
42
43 meta = {
44 description = "Compact representation of a placeholder for an image";
45 homepage = "https://github.com/woltapp/blurhash-python";
46 license = lib.licenses.mit;
47 maintainers = with lib.maintainers; [ dotlambda ];
48 };
49}