anchor.diff:  
     configurePhase = args.configurePhase or ''
       export STACK_ROOT=$NIX_BUILD_TOP/.stack
  +    ${addStackArgsHook}
     '';
   
     buildPhase = args.buildPhase or "${stackCmd} build";
  
positive.code: }@args:
  
  let stackCmd = "stack --internal-re-exec-version=${stack.version}";
  in stdenv.mkDerivation (args // {
  
    buildInputs =
  
negative.code:   STACK_PLATFORM_VARIANT="nix";
    STACK_IN_NIX_SHELL=1;
    STACK_IN_NIX_EXTRA_ARGS = extraArgs;
    shellHook = addStackArgsHook;
  
  
    # XXX: workaround for https://ghc.haskell.org/trac/ghc/ticket/11042.
  