2021-01-15 09:19:50 +00:00
|
|
|
{ lib, stdenv, fetchurl, leptonica, zlib, libwebp, giflib, libjpeg, libpng, libtiff }:
|
2016-02-21 23:56:49 +00:00
|
|
|
|
2021-08-12 19:41:54 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "jbig2enc";
|
|
|
|
version = "0.28";
|
2013-01-16 10:43:53 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-12 19:41:54 +01:00
|
|
|
url = "https://github.com/agl/jbig2enc/archive/${version}-dist.tar.gz";
|
2013-01-16 10:43:53 +00:00
|
|
|
sha256 = "1wc0lmqz4jag3rhhk1xczlqpfv2qqp3fz7wzic2lba3vsbi1rrw3";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ leptonica zlib libwebp giflib libjpeg libpng libtiff ];
|
|
|
|
|
2016-03-24 19:21:07 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/agl/jbig2enc/commit/53ce5fe7e73d7ed95c9e12b52dd4984723f865fa
|
|
|
|
./53ce5fe7e73d7ed95c9e12b52dd4984723f865fa.patch
|
|
|
|
];
|
|
|
|
|
2013-01-16 10:43:53 +00:00
|
|
|
# This is necessary, because the resulting library has
|
|
|
|
# /tmp/nix-build-jbig2enc/src/.libs before /nix/store/jbig2enc/lib
|
|
|
|
# in its rpath, which means that patchelf --shrink-rpath removes
|
|
|
|
# the /nix/store one. By cleaning up before fixup, we ensure that
|
|
|
|
# the /tmp/nix-build-jbig2enc/src/.libs directory is gone.
|
|
|
|
preFixup = ''
|
|
|
|
make clean
|
|
|
|
'';
|
2013-08-28 21:07:20 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Encoder for the JBIG2 image compression format";
|
2021-01-15 09:19:50 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
platforms = lib.platforms.all;
|
2013-08-28 21:07:20 +01:00
|
|
|
};
|
2013-01-16 10:43:53 +00:00
|
|
|
}
|