Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / blurhash / default.nix
blobd0cf2135f1bcdf60956a82f9d1b01b04b9218723
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytestCheckHook
5 , pillow
6 , numpy
7 }:
9 buildPythonPackage rec {
10   pname = "blurhash";
11   version = "1.1.4";
13   src = fetchFromGitHub {
14     owner = "halcy";
15     repo = "blurhash-python";
16     # There are no tags: https://github.com/halcy/blurhash-python/issues/4
17     rev = "22e081ef1c24da1bb5c5eaa2c1d6649724deaef8";
18     sha256 = "1qq6mhydlp7q3na4kmaq3871h43wh3pyfyxr4b79bia73wjdylxf";
19   };
21   postPatch = ''
22     sed -i '/^addopts/d' setup.cfg
23   '';
25   nativeCheckInputs = [
26     pytestCheckHook
27     pillow
28     numpy
29   ];
31   pythonImportsCheck = [ "blurhash" ];
33   meta = with lib; {
34     description = "Pure-Python implementation of the blurhash algorithm";
35     homepage = "https://github.com/halcy/blurhash-python";
36     license = licenses.mit;
37     maintainers = with maintainers; [ dotlambda ];
38   };