anchor.diff:          ''}
           $extraOptions
           END
  -      '';
  +      '' + optionalString cfg.checkConfig ''
  +        echo "Checking that Nix can read nix.conf..."
  +        ln -s $out ./nix.conf
  +        NIX_CONF_DIR=$PWD ${cfg.package}/bin/nix show-config >/dev/null
  +      '');
   
   in
   
  
positive.code:         '';
        };
  
      };
  
    };
  
negative.code:       sh = pkgs.runtimeShell;
        binshDeps = pkgs.writeReferencesToFile sh;
      in
        pkgs.runCommand "nix.conf" { extraOptions = cfg.extraOptions; } (''
          ${optionalString (!isNix20) ''
            extraPaths=$(for i in $(cat ${binshDeps}); do if test -d $i; then echo $i; fi; done)
          ''}
  