anchor.diff:            cp -pR ${unwords self.sourceDirectories} ${mapInside self.topSourceDirectories} $out/share/agda
             runHook postInstall
           '';
  +
  +        # Optionally-built conveniences
  +        extras = {
  +          # Makes a wrapper available to the user. Very useful in
  +          # nix-shell where all dependencies are -i'd.
  +          agdaWrapper = writeScriptBin "agda" ''
  +            ${self.agdaWithArgs} "$@"
  +          '';
  +
  +          # Use this to stick `agdaWrapper` at the front of the PATH:
  +          #
  +          # agda.mkDerivation (self: { PATH = self.extras.agdaWrapperPATH; })
  +          #
  +          # Not sure this is the best way to handle conflicts....
  +          agdaWrapperPATH = "${self.extras.agdaWrapper}/bin:$PATH";
  +
  +          AGDA_PACKAGE_PATH = concatMapStrings (x: x + ":") self.buildDependsAgdaShareAgda;
  +        };
         };
       in stdenv.mkDerivation
            (postprocess (let super = defaults self // args self;
  
positive.code:         propagatedBuildInputs = filter (y : ! (y == null)) x.propagatedBuildInputs;
          propagatedUserEnvPkgs = filter (y : ! (y == null)) x.propagatedUserEnvPkgs;
          everythingFile = if x.everythingFile == "" then "Everything.agda" else x.everythingFile;
        };
  
        defaults = self : {
  
negative.code:                       ++ [ "." ];
          buildFlags = unwords (map (x: "-i " + x) self.includeDirs);
  
          agdaWithArgs = "${Agda}/bin/agda ${self.buildFlags}";
  
          buildPhase = ''
            runHook preBuild
            ${self.agdaWithArgs} ${self.everythingFile}
            runHook postBuild
          '';
  
  