anchor.diff:      ## cndrvcups-lb buildPhase
       ##
   
  -    ( cd cndrvcups-lb-2.90/ppd
  -      ./autogen.sh --prefix=$out
  -      make
  -    )
  -
  -    ( cd cndrvcups-lb-2.90/pstoufr2cpca
  -      CPPFLAGS="-I$out/include" LDFLAGS=" -L$out/lib" ./autogen.sh --prefix=$out --enable-progpath=$out/bin
  -      make
  -    )
  -
  -    ( cd cndrvcups-lb-2.90/cpca
  -      CPPFLAGS="-I$out/include" LDFLAGS=" -L$out/lib" ./autogen.sh --prefix=$out --enable-progpath=$out/bin  --enable-static
  +    ( cd cndrvcups-lb-${version}/buftool
  +      ./autogen.sh --prefix=$out --libdir=$out/lib --enable-progpath=$out/bin --enable-static
  +      make
  +    )
  +
  +    ( cd cndrvcups-lb-${version}/pstoufr2cpca
  +      ./autogen.sh --prefix=$out --libdir=$out/lib
         make
       )
   
  
positive.code: {stdenv, fetchurl, unzip, autoreconfHook, libtool, makeWrapper, cups, ghostscript, pkgsi686Linux }:
  
  let
  
    i686_NIX_GCC = pkgsi686Linux.callPackage ({gcc}: gcc) {};
    i686_libxml2 = pkgsi686Linux.callPackage ({libxml2}: libxml2) {};
  
    src_canon = fetchurl {
      url = "https://files.canon-europe.com/files/soft45378/software/o147jen_linuxufrII_0290.zip";
      sha256 = "1qpdmaaw42gm5fi21rp4lf05skffkq42ka5c8xkw8rckzb13sy9j";
    };
  
  in
  
  
  stdenv.mkDerivation {
    name = "canon-cups-ufr2-2.90";
    src = src_canon;
  
    phases = [ "unpackPhase" "installPhase" ];
  
    postUnpack = ''
      (cd $sourceRoot; tar -xzf Sources/cndrvcups-common-2.90-1.tar.gz)
      (cd $sourceRoot; tar -xzf Sources/cndrvcups-lb-2.90-1.tar.gz)
    '';
  
    nativeBuildInputs = [ makeWrapper unzip autoreconfHook libtool ];
  
    buildInputs = [ cups ];
  
    installPhase = ''
      ##
      ## cndrvcups-common buildPhase
      ##
      ( cd cndrvcups-common-2.90/buftool
        autoreconf -fi
        ./autogen.sh --prefix=$out --enable-progpath=$out/bin --libdir=$out/lib --disable-shared --enable-static
        make
      )
  
      ( cd cndrvcups-common-2.90/backend
        ./autogen.sh --prefix=$out --libdir=$out/lib
        make
      )
  
      ( cd cndrvcups-common-2.90/c3plmod_ipc
        make
      )
  
  
negative.code:       ln -sf libcnlbcm.so.1.0 libcnlbcm.so
      )
  
      ( cd cndrvcups-lb-${version}
        chmod 644 data/CnLB*
        chmod 644 libs/cnpkbidi_info*
        chmod 644 libs/ThLB*
  