about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/jbig2dec
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/jbig2dec')
-rw-r--r--nixpkgs/pkgs/development/libraries/jbig2dec/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/jbig2dec/default.nix b/nixpkgs/pkgs/development/libraries/jbig2dec/default.nix
new file mode 100644
index 000000000000..af99944dae72
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jbig2dec/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, python3, autoconf, automake, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "jbig2dec";
+  version = "0.20";
+
+  src = fetchurl {
+    url = "https://github.com/ArtifexSoftware/jbig2dec/archive/${version}/jbig2dec-${version}.tar.gz";
+    hash = "sha256-qXBTaaZjOrpTJpNFDsgCxWI5fhuCRmLegJ7ekvZ6/yE=";
+  };
+
+  postPatch = ''
+    patchShebangs test_jbig2dec.py
+  '';
+
+  nativeBuildInputs = [ autoconf automake libtool ];
+
+  # `autogen.sh` runs `configure`, and expects that any flags needed
+  # by `configure` (like `--host`) are passed to `autogen.sh`.
+  configureScript = "./autogen.sh";
+
+  nativeCheckInputs = [ python3 ];
+  doCheck = true;
+
+  meta = {
+    homepage = "https://www.jbig2dec.com/";
+    description = "Decoder implementation of the JBIG2 image compression format";
+    license = lib.licenses.agpl3;
+    platforms = lib.platforms.unix;
+  };
+}