anchor.diff:      lib.versions.majorMinor (lib.getVersion openjpeg);
   
   
  -in stdenv.mkDerivation rec {
  +in
  +stdenv.mkDerivation rec {
     version = "1.18.0";
     pname = "mupdf";
   
  
positive.code:   # Use shared libraries to decrease size
    buildFlags = [ "shared" ];
  
    makeFlags = [ "prefix=$(out) USE_SYSTEM_LIBS=yes" ];
    nativeBuildInputs = [ pkg-config ];
    buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg freeglut libGLU gumbo ]
                  ++ lib.optionals enableX11 [ libX11 libXext libXi libXrandr ]
                  ++ lib.optionals enableCurl [ curl openssl ]
                  ++ lib.optionals enableGL (
                    if stdenv.isDarwin then
                      with darwin.apple_sdk.frameworks; [ GLUT OpenGL ]
                    else
                      [ freeglut libGLU ])
                  ;
    outputs = [ "bin" "dev" "out" "man" "doc" ];
  
    preConfigure = ''
  
negative.code: { stdenv
  , lib
  , fetchurl
  , fetchpatch
  , pkg-config
  , freetype
  , harfbuzz
  , openjpeg
  , jbig2dec
  , libjpeg
  , darwin
  , gumbo
  , enableX11 ? true
  , libX11
  , libXext
  , libXi
  , libXrandr
  , enableCurl ? true
  , curl
  , openssl
  , enableGL ? true
  , freeglut
  , libGLU
  }:
  let
  
    # OpenJPEG version is hardcoded in package source
  