about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/python-djvulibre/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/python-djvulibre/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/python-djvulibre/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/python-djvulibre/default.nix b/nixpkgs/pkgs/development/python-modules/python-djvulibre/default.nix
new file mode 100644
index 000000000000..3853e7951167
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/python-djvulibre/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, cython
+, djvulibre
+, ghostscript_headless
+, packaging
+, pkg-config
+, requests
+, setuptools
+, unittestCheckHook
+, wheel
+}:
+
+buildPythonPackage rec {
+  pname = "python-djvulibre";
+  version = "0.9.0";
+  pyproject = true;
+
+  src = fetchFromGitHub {
+    owner = "FriedrichFroebel";
+    repo = "python-djvulibre";
+    rev = version;
+    hash = "sha256-OrOZFvzDEBwBmIc+i3LjNTh6K2vhe6NWtSJrFTSkrgA=";
+  };
+
+  nativeBuildInputs = [
+    cython
+    packaging
+    pkg-config
+    setuptools
+    wheel
+  ];
+
+  buildInputs = [
+    djvulibre
+    ghostscript_headless
+  ];
+
+  preCheck = ''
+    rm -rf djvu
+  '';
+
+  nativeCheckInputs = [ unittestCheckHook ];
+
+  unittestFlagsArray = [ "tests" "-v" ];
+
+  meta = with lib; {
+    description = "Python support for the DjVu image format";
+    homepage = "https://github.com/FriedrichFroebel/python-djvulibre";
+    license = licenses.gpl2Only;
+    changelog = "https://github.com/FriedrichFroebel/python-djvulibre/releases/tag/${version}";
+    maintainers = with maintainers; [ dansbandit ];
+  };
+}