about summary refs log tree commit diff
path: root/pkgs/development/python-modules/blurhash-python/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/blurhash-python/default.nix')
-rw-r--r--pkgs/development/python-modules/blurhash-python/default.nix50
1 files changed, 50 insertions, 0 deletions
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 0000000000000..71b2961ee3def
--- /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 ];
+  };
+}