anchor.diff:        '';
   
   
  -  # Make a package that just contains a setup hook with the given contents.
  +  /*
  +   * Make a package that just contains a setup hook with the given contents.
  +   * This setup hook will be invoked by any package that includes this package
  +   * as a buildInput. Optionally takes a list of substitutions that should be
  +   * applied to the resulting script.
  +   *
  +   * Examples:
  +   * # setup hook that depends on the hello package and runs ./myscript.sh
  +   * myhellohook = makeSetupHook { deps = [ hello ]; } ./myscript.sh;
  +   *
  +   * # wrotes a setup hook where @bash@ myscript.sh is substituted for the
  +   * # bash interpreter. 
  +   * myhellohookSub = makeSetupHook {
  +   *                 deps = [ hello ];
  +   *                 substitutions = { bash = "${pkgs.bash}/bin/bash"; };
  +   *               } ./myscript.sh;
  +   */
     makeSetupHook = { name ? "hook", deps ? [], substitutions ? {} }: script:
       runCommand name substitutions
         (''
  
positive.code:       '';
  
  
    # Shorthands for `writeTextFile'.
    writeText = name: text: writeTextFile {inherit name text;};
    writeTextDir = name: text: writeTextFile {inherit name text; destination = "/${name}";};
    writeScript = name: text: writeTextFile {inherit name text; executable = true;};
    writeScriptBin = name: text: writeTextFile {inherit name text; executable = true; destination = "/bin/${name}";};
  
    # Create a Shell script, check its syntax
    writeShellScriptBin = name : text :
      writeTextFile {
        inherit name;
  
negative.code: 
  rec {
  
    /* Run the shell command `buildCommand' to produce a store path named
    * `name'.  The attributes in `env' are added to the environment
    * prior to running the command. By default `runCommand' runs using
    * stdenv with no compiler environment. `runCommandCC` 
    *
    * Examples:
    * runCommand "name" {envVariable = true;} ''echo hello''
    * runCommandNoCC "name" {envVariable = true;} ''echo hello'' # equivalent to prior
    * runCommandCC "name" {} ''gcc -o myfile myfile.c; cp myfile $out''; 
    */
    runCommand = runCommandNoCC;
    runCommandNoCC = runCommand' stdenvNoCC;
    runCommandCC = runCommand' stdenv;
  
  
    /* Writes a text file to the nix store.
     * The contents of text is added to the file in the store.
     *
     * Examples:
     * # Writes my-file to /nix/store/<store path>
     * writeTextFile "my-file"
     *   ''
     *   Contents of File
     *   '';
     *
     * # Writes executable my-file to /nix/store/<store path>/bin/my-file
     * writeTextFile "my-file"
     *   ''
     *   Contents of File
     *   ''
     *   true
     *   "/bin/my-file";
     *   true
     */
    writeTextFile =
      { name # the name of the derivation
      , text
  