anchor.diff:      export STACK_ROOT=$NIX_BUILD_TOP/.stack
     '';
   
  -  buildPhase = args.buildPhase or "stack build";
  +  buildPhase = args.buildPhase or "${stackCmd} build";
   
  -  checkPhase = args.checkPhase or "stack test";
  +  checkPhase = args.checkPhase or "${stackCmd} test";
   
     doCheck = args.doCheck or true;
   
     installPhase = args.installPhase or ''
  -    stack --local-bin-path=$out/bin build --copy-bins
  +    ${stackCmd} --local-bin-path=$out/bin build --copy-bins
     '';
   })
  
positive.code: , extraArgs ? []
  , LD_LIBRARY_PATH ? []
  , ghc ? depArgs.ghc
  , ...
  }@args:
  
  stdenv.mkDerivation (args // {
  
    buildInputs =
      buildInputs ++
      optional stdenv.isLinux glibcLocales ++
      [ ghc pkgconfig ];
  
    STACK_PLATFORM_VARIANT="nix";
    STACK_IN_NIX_SHELL=1;
  
negative.code: { stdenv, ghc, pkgconfig, glibcLocales, cacert, stack }@depArgs:
  
  with stdenv.lib;
  
  