diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2017-11-20 08:35:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-20 08:35:26 +0100 |
commit | 29fc4369c8f0ea396d022f361fb86cec156e3bac (patch) | |
tree | 491afde5d8bcb25bae0cddb6eae2ad1d2cf559e2 /pkgs/applications | |
parent | cce47a6bf5013b2cb146e70fdb2adadbadcdb118 (diff) | |
parent | ce59d9bece7ab739780dc8548504c2163c3171b6 (diff) | |
download | nixpkgs-29fc4369c8f0ea396d022f361fb86cec156e3bac.tar nixpkgs-29fc4369c8f0ea396d022f361fb86cec156e3bac.tar.gz nixpkgs-29fc4369c8f0ea396d022f361fb86cec156e3bac.tar.bz2 nixpkgs-29fc4369c8f0ea396d022f361fb86cec156e3bac.tar.lz nixpkgs-29fc4369c8f0ea396d022f361fb86cec156e3bac.tar.xz nixpkgs-29fc4369c8f0ea396d022f361fb86cec156e3bac.tar.zst nixpkgs-29fc4369c8f0ea396d022f361fb86cec156e3bac.zip |
Merge pull request #31852 from adisbladis/mupdf-openjpeg-version
mupdf: Patch openjpeg version
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/misc/mupdf/default.nix | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/pkgs/applications/misc/mupdf/default.nix b/pkgs/applications/misc/mupdf/default.nix index b50d99466f8..ca609364459 100644 --- a/pkgs/applications/misc/mupdf/default.nix +++ b/pkgs/applications/misc/mupdf/default.nix @@ -4,7 +4,15 @@ , enableCurl ? true, curl, openssl }: -stdenv.mkDerivation rec { +let + + # OpenJPEG version is hardcoded in package source + openJpegVersion = with stdenv; + lib.concatStringsSep "." (lib.lists.take 2 + (lib.splitString "." (lib.getVersion openjpeg))); + + +in stdenv.mkDerivation rec { version = "1.11"; name = "mupdf-${version}"; @@ -16,9 +24,9 @@ stdenv.mkDerivation rec { patches = [ # Compatibility with new openjpeg (fetchpatch { - name = "mupdf-1.11-openjpeg-2.1.1.patch"; - url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/0001-mupdf-openjpeg.patch?h=packages/mupdf&id=3d997e7ff2ac20c44856ede22760ba6fbca81a5c"; - sha256 = "1vr12kpzmmfr8pp3scwfhrm5laqwd58xm6vx971c4y8bxy60b2ig"; + name = "mupdf-1.11-openjpeg-version.patch"; + url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/0001-mupdf-openjpeg.patch?h=packages/mupdf&id=c19349f42838e4dca02e564b97e0a5ab3e1b943f"; + sha256 = "0sx7jq84sr8bj6sg2ahg9cdgqz8dh4w6r0ah2yil8vrsznn4la8r"; }) (fetchurl { @@ -58,6 +66,10 @@ stdenv.mkDerivation rec { }) ]; + postPatch = '' + sed -i "s/__OPENJPEG__VERSION__/${openJpegVersion}/" source/fitz/load-jpx.c + ''; + makeFlags = [ "prefix=$(out)" ]; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg ] |