anchor.diff:  }:
   
   
  -let pkgs = rec {
  +let
  +
  +  lib = import ../lib;
  +
  +  # The contents of the configuration file found at $NIXPKGS_CONFIG or
  +  # $HOME/.nixpkgs/config.nix.
  +  config =
  +    let {
  +      toPath = builtins.toPath;
  +      getEnv = x: if builtins ? getEnv then builtins.getEnv x else "";
  +      pathExists = name:
  +        builtins ? pathExists && builtins.pathExists (toPath name);
  +
  +      configFile = getEnv "NIXPKGS_CONFIG";
  +      homeDir = getEnv "HOME";
  +      configFile2 = homeDir + "/.nixpkgs/config.nix";
  +
  +      body =
  +        if configFile != "" && pathExists configFile
  +        then import (toPath configFile)
  +        else if homeDir != "" && pathExists configFile2
  +        then import (toPath configFile2)
  +        else {};
  +    };
  +
  +  # Return an attribute from the Nixpkgs configuration file, or
  +  # a default value if the attribute doesn't exist.
  +  getConfig = attrPath: default: lib.getAttr attrPath default config;
  +
  +
  +  # Allow packages to be overriden globally via the `packageOverrides'
  +  # configuration option, which must be a function that takes `pkgs'
  +  # as an argument and returns a set of new or overriden packages.
  +  # `__overrides' is a magic attribute that causes the attributes in
  +  # its value to be added to the surrounding `rec'.
  +  __overrides = (getConfig ["packageOverrides"] (pkgs: {})) pkgs;
  +
  +
  +  # The package compositions.  Yes, this isn't properly indented.
  +  pkgs = rec {
  +
  +
  +  inherit __overrides;
  +
  +
  +  # For convenience, allow callers to get the path to Nixpkgs.
  +  path = ./..;
   
     
     ### Symbolic names.
  
positive.code:   ### Helper functions.
  
  
    # Override the compiler in stdenv for specific packages.
    overrideGCC = stdenv: gcc: stdenv //
      { mkDerivation = args: stdenv.mkDerivation (args // { NIX_GCC = gcc; });
  
negative.code: 
    myEnvFun = import ../misc/my_env;
  
  }; in pkgs
  