diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/blurhash/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/blurhash/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/blurhash/default.nix b/nixpkgs/pkgs/development/python-modules/blurhash/default.nix new file mode 100644 index 000000000000..665f08f7987c --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/blurhash/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pillow +, numpy +}: + +buildPythonPackage rec { + pname = "blurhash"; + version = "1.1.4"; + + src = fetchFromGitHub { + owner = "halcy"; + repo = "blurhash-python"; + # There are no tags: https://github.com/halcy/blurhash-python/issues/4 + rev = "22e081ef1c24da1bb5c5eaa2c1d6649724deaef8"; + sha256 = "1qq6mhydlp7q3na4kmaq3871h43wh3pyfyxr4b79bia73wjdylxf"; + }; + + postPatch = '' + sed -i '/^addopts/d' setup.cfg + ''; + + checkInputs = [ + pytestCheckHook + pillow + numpy + ]; + + pythonImportsCheck = [ "blurhash" ]; + + meta = with lib; { + description = "Pure-Python implementation of the blurhash algorithm"; + homepage = "https://github.com/halcy/blurhash-python"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} |