16 stdenv.mkDerivation rec {
20 src = fetchFromGitHub {
24 hash = "sha256-IAL4egXgaGmCilzcryjuvOoHhahyrfGWY68GBfXXgAM=";
27 nativeBuildInputs = [ autoreconfHook ];
29 propagatedBuildInputs = [
41 name = "fix-build-leptonica-1.83.patch";
42 url = "https://github.com/agl/jbig2enc/commit/ea050190466f5336c69c6a11baa1cb686677fcab.patch";
43 hash = "sha256-+kScjFgDEU9F7VOUNAhm2XBjGm49fzAH8hYhmTm8xv8=";
47 # We don't want to install this Python 2 script
52 # This is necessary, because the resulting library has
53 # /tmp/nix-build-jbig2enc/src/.libs before /nix/store/jbig2enc/lib
54 # in its rpath, which means that patchelf --shrink-rpath removes
55 # the /nix/store one. By cleaning up before fixup, we ensure that
56 # the /tmp/nix-build-jbig2enc/src/.libs directory is gone.
62 description = "Encoder for the JBIG2 image compression format";
63 license = lib.licenses.asl20;
64 platforms = lib.platforms.all;
65 homepage = "https://github.com/agl/jbig2enc";
66 mainProgram = "jbig2";