anchor.diff:        absolutePaths = builtins.map (path: builtins.toPath (root + "/" + path)) relativePaths;
       in
         absolutePaths;
  -
   }
  
positive.code: 
    inherit (builtins) stringLength substring head tail isString replaceStrings;
  
  
    # Concatenate a list of strings.
    concatStrings =
      if builtins ? concatStringsSep then
        builtins.concatStringsSep ""
      else
        lib.foldl' (x: y: x + y) "";
  
  
    # Map a function over a list and concatenate the resulting strings.
    concatMapStrings = f: list: concatStrings (map f list);
    concatImapStrings = f: list: concatStrings (lib.imap f list);
  
  
    # Place an element between each element of a list, e.g.,
    # `intersperse "," ["a" "b" "c"]' returns ["a" "," "b" "," "c"].
    intersperse = separator: list:
      if list == [] || length list == 1
      then list
      else tail (lib.concatMap (x: [separator x]) list);
  
  
    # Concatenate a list of strings with a separator between each element, e.g.
    # concatStringsSep " " ["foo" "bar" "xyzzy"] == "foo bar xyzzy"
    concatStringsSep = builtins.concatStringsSep or (separator: list:
      concatStrings (intersperse separator list));
  
    concatMapStringsSep = sep: f: list: concatStringsSep sep (map f list);
    concatImapStringsSep = sep: f: list: concatStringsSep sep (lib.imap f list);
  
  
    # Construct a Unix-style search path consisting of each `subDir"
    # directory of the given list of packages.  For example,
    # `makeSearchPath "bin" ["x" "y" "z"]' returns "x/bin:y/bin:z/bin".
    makeSearchPath = subDir: packages:
      concatStringsSep ":" (map (path: path + "/" + subDir) packages);
  
  
    # Construct a library search path (such as RPATH) containing the
    # libraries for a set of packages, e.g. "${pkg1}/lib:${pkg2}/lib:...".
    makeLibraryPath = makeSearchPath "lib";
  
    # Construct a binary search path (such as $PATH) containing the
    # binaries for a set of packages, e.g. "${pkg1}/bin:${pkg2}/bin:...".
    makeBinPath = makeSearchPath "bin";
  
  
    # Idem for Perl search paths.
    makePerlPath = makeSearchPath "lib/perl5/site_perl";
  
  
    # Dependening on the boolean `cond', return either the given string
    # or the empty string.
    optionalString = cond: string: if cond then string else "";
  
  
    # Determine whether a string has given prefix/suffix.
    hasPrefix = pref: str:
      substring 0 (stringLength pref) str == pref;
    hasSuffix = suff: str:
      let
        lenStr = stringLength str;
  
negative.code:       else
          s;
  
    /* Return true iff string v1 denotes a version older than v2.
  
       Example:
         versionOlder "1.1" "1.2"
         => true
         versionOlder "1.1" "1.1"
         => false
    */
    versionOlder = v1: v2: builtins.compareVersions v2 v1 == 1;
  
    /* Return true iff string v1 denotes a version equal to or newer than v2.
  
       Example:
         versionAtLeast "1.1" "1.0"
         => true
         versionAtLeast "1.1" "1.1"
         => true
         versionAtLeast "1.1" "1.2"
         => false
    */
    versionAtLeast = v1: v2: !versionOlder v1 v2;
  
    /* This function takes an argument that's either a derivation or a
       derivation's "name" attribute and extracts the version part from that
       argument.
  
       Example:
         getVersion "youtube-dl-2016.01.01"
         => "2016.01.01"
         getVersion pkgs.youtube-dl
         => "2016.01.01"
    */
    getVersion = x: (builtins.parseDrvName (x.name or x)).version;
  
    /* Extract name with version from URL. Ask for separator which is
       supposed to start extension.
  
       Example:
         nameFromURL "https://nixos.org/releases/nix/nix-1.7/nix-1.7-x86_64-linux.tar.bz2" "-"
         => "nix"
         nameFromURL "https://nixos.org/releases/nix/nix-1.7/nix-1.7-x86_64-linux.tar.bz2" "_"
         => "nix-1.7-x86"
    */
    nameFromURL = url: sep:
      let
        components = splitString "/" url;
  