anchor.diff:        sha256 = "04kfww7y0wazg6372g44fa2k5kiiigq4616ihkvmp18rz86903n9";
       })
     ];
  +
  +  postPatch = ''
  +    sed -i "s/__OPENJPEG__VERSION__/${openJpegVersion}/" source/fitz/load-jpx.c
  +  '';
   
     makeFlags = [ "prefix=$(out)" ];
     nativeBuildInputs = [ pkgconfig ];
  
positive.code:   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";
      })
  
      (fetchurl {
  
negative.code: , enableCurl ? true, curl, openssl
  }:
  
  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}";
  
  