anchor.diff:    confPkg = pkgs.runCommand "fontconfig-conf" {
       preferLocalBuild = true;
     } ''
  -    support_folder=$out/etc/fonts/conf.d
  -    latest_folder=$out/etc/fonts/${latestVersion}/conf.d
  -
  -    mkdir -p $support_folder
  -    mkdir -p $latest_folder
  +    dst=$out/etc/fonts/${pkg.configVersion}/conf.d
  +    mkdir -p $dst
   
       # fonts.conf
  -    ln -s ${supportFontsConf} $support_folder/../fonts.conf
  -    ln -s ${latestPkg.out}/etc/fonts/fonts.conf \
  -          $latest_folder/../fonts.conf
  +    ln -s ${pkg.out}/etc/fonts/fonts.conf \
  +          $dst/../fonts.conf
   
       # fontconfig default config files
  -    ln -s ${supportPkg.out}/etc/fonts/conf.d/*.conf \
  -          $support_folder/
  -    # Latest fontconfig is configured to look for the upstream defaults inside the package.
  +    ln -s ${pkg.out}/etc/fonts/conf.d/*.conf \
  +          $dst/
  +
  +    # update 51-local.conf path to look at local.conf
  +    rm  $dst/51-local.conf
  +
  +    substitute ${pkg.out}/etc/fonts/conf.d/51-local.conf \
  +               $dst/51-local.conf \
  +               --replace local.conf /etc/fonts/${pkg.configVersion}/local.conf
   
       # 00-nixos-cache.conf
  -    ln -s ${cacheConfSupport} \
  -          $support_folder/00-nixos-cache.conf
  -    ln -s ${cacheConfLatest}  $latest_folder/00-nixos-cache.conf
  +    ln -s ${cacheConf}  $dst/00-nixos-cache.conf
   
       # 10-nixos-rendering.conf
  -    ln -s ${renderConf}       $support_folder/10-nixos-rendering.conf
  -    ln -s ${renderConf}       $latest_folder/10-nixos-rendering.conf
  +    ln -s ${renderConf}       $dst/10-nixos-rendering.conf
   
       # 50-user.conf
       ${optionalString (!cfg.includeUserConf) ''
  -    rm $support_folder/50-user.conf
  -    ''}
  -    # Since latest fontconfig looks for default files inside the package,
  -    # we had to move this one elsewhere to be able to exclude it here.
  -    ${optionalString cfg.includeUserConf ''
  -    ln -s ${latestPkg.out}/etc/fonts/conf.d.bak/50-user.conf $latest_folder/50-user.conf
  +    rm $dst/50-user.conf
       ''}
   
       # local.conf (indirect priority 51)
       ${optionalString (cfg.localConf != "") ''
  -    ln -s ${localConf}        $support_folder/../local.conf
  -    ln -s ${localConf}        $latest_folder/../local.conf
  +    ln -s ${localConf}        $dst/../local.conf
       ''}
   
       # 52-nixos-default-fonts.conf
  -    ln -s ${defaultFontsConf} $support_folder/52-nixos-default-fonts.conf
  -    ln -s ${defaultFontsConf} $latest_folder/52-nixos-default-fonts.conf
  +    ln -s ${defaultFontsConf} $dst/52-nixos-default-fonts.conf
   
       # 53-no-bitmaps.conf
  -    ln -s ${rejectBitmaps} $support_folder/53-no-bitmaps.conf
  -    ln -s ${rejectBitmaps} $latest_folder/53-no-bitmaps.conf
  +    ln -s ${rejectBitmaps} $dst/53-no-bitmaps.conf
   
       ${optionalString (!cfg.allowType1) ''
       # 53-nixos-reject-type1.conf
  -    ln -s ${rejectType1} $support_folder/53-nixos-reject-type1.conf
  -    ln -s ${rejectType1} $latest_folder/53-nixos-reject-type1.conf
  +    ln -s ${rejectType1} $dst/53-nixos-reject-type1.conf
       ''}
     '';
   
  
positive.code: /*
  
  NixOS support 2 fontconfig versions, "support" and "latest".
  
  - "latest" refers to default fontconfig package (pkgs.fontconfig).
    configuration files are linked to /etc/fonts/VERSION/conf.d/
  - "support" refers to supportPkg (pkgs."fontconfig_${supportVersion}").
    configuration files are linked to /etc/fonts/conf.d/
  
  This module generates a package containing configuration files and link it in /etc/fonts.
  
  
negative.code:   cfg = config.fonts.fontconfig;
  
    fcBool = x: "<bool>" + (boolToString x) + "</bool>";
    pkg = pkgs.fontconfig;
  
    # configuration file to read fontconfig cache
    # priority 0
    cacheConf  = makeCacheConf {};
  
    # generate the font cache setting file
    # When cross-compiling, we can’t generate the cache, so we skip the
    # <cachedir> part. fontconfig still works but is a little slower in
    # looking things up.
    makeCacheConf = { }:
      let
        makeCache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; };
        cache     = makeCache pkgs.fontconfig;
        cache32   = makeCache pkgs.pkgsi686Linux.fontconfig;
      in
      pkgs.writeText "fc-00-nixos-cache.conf" ''
        <?xml version='1.0'?>
  