diff --git a/pkgs/development/python-modules/blurhash-python/default.nix b/pkgs/development/python-modules/blurhash-python/default.nix new file mode 100644 index 000000000000..71b2961ee3de --- /dev/null +++ b/pkgs/development/python-modules/blurhash-python/default.nix @@ -0,0 +1,50 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, cffi +, pillow +, pytestCheckHook +, setuptools-scm +, six +}: + +buildPythonPackage rec { + pname = "blurhash-python"; + version = "1.2.1"; + + disabled = pythonOlder "3.8"; + + pyproject = true; + + src = fetchFromGitHub { + owner = "woltapp"; + repo = "blurhash-python"; + rev = "v${version}"; + hash = "sha256-z7V2Ck8h12Vuj/5/s9ZP/uqQ4olo8xwg+ZR3iW4ca/M="; + }; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 81e424557766..6375fac04d61 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1583,6 +1583,8 @@ self: super: with self; { blurhash = callPackage ../development/python-modules/blurhash { }; + blurhash-python = callPackage ../development/python-modules/blurhash-python { }; + bme280spi = callPackage ../development/python-modules/bme280spi { }; bme680 = callPackage ../development/python-modules/bme680 { };