anchor.diff:          exec = "${cups}/sbin/cupsd -c ${pkgs.writeText "cupsd.conf" cfg.cupsdConf} -F";
         };
   
  +    services.printing.drivers = [ pkgs.cups pkgs.ghostscript ];
       services.printing.cupsdConf = 
         ''
           LogLevel info
  
positive.code:         description = ''
            The contents of the configuration file of the CUPS daemon
            (<filename>cupsd.conf</filename>).
          '';
        };
  
  
negative.code:   # we can't update ${cups}/lib/cups itself, we create a symlink tree
    # here and add the additional programs.  The ServerBin directive in
    # cupsd.conf tells cupsd to use this tree.
    bindir = pkgs.buildEnv {
      name = "cups-progs";
      paths = cfg.drivers;
      pathsToLink = [ "/lib/cups" "/share/cups" ];
      postBuild =  ''
        ${pkgs.coreutils}/bin/mkdir -p $out/lib/cups/backend
        ${pkgs.coreutils}/bin/ln -s ${pkgs.samba}/bin/smbspool $out/lib/cups/backend/smb
  
        # Provide support for printing via HTTPS.
        ${pkgs.coreutils}/bin/ln -s ipp $out/lib/cups/backend/https
  
        ${cfg.bindirCmds}
      '';
    };
  
  in
  
  