anchor.diff:        inherit name buildCommand;
       } // env);
   
  +  # Trivial type of text file
  +  writeText = name: text: derivation {
  +    inherit name text;
  +    builder = "/bin/sh";
  +    system = "x86_64-linux";
  +    args = [ "-e" (builtins.toFile "write-text.sh" ''
  +      set -x
  +      exec 4<"$textPath"
  +      exec 5>"$out"
  +      while read -r txt <&4; do
  +        printf "%s\n" "$txt" >&5
  +      done
  +      printf "%s" "$txt" >&5
  +    '') ];
  +    passAsFile = [ "text" ];
  +    allowSubstitutes = false;
  +    preferLocalBuild = true;
  +    __structuredAttrs = false;
  +    __noChroot = true;
  +  };
  +
   
     # Create a single file.
     writeTextFile =
  
positive.code:     , executable ? false # run chmod +x ?
      , destination ? ""   # relative path appended to $out eg "/bin/foo"
      }:
      runCommand name
        { inherit text executable;
          passAsFile = [ "text" ];
  
negative.code: 
  
    # Shorthands for `writeTextFile'.
    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}";};
  