anchor.diff:    , cmake, curl, patch, zlib, icu, sqlite, libuuid
     , readline, openssl, spidermonkey_1_8_0rc1
     , nspr, nss
  +  , unzip, glibcLocales
     , runTests ? false
     , ...}:
   builderDefsPackage
  
positive.code:     cmake -G "Unix Makefiles" -D SGNEEDS_DIR="$SGNEEDS_DIR" -D VVTHIRDPARTY="$VVTHIRDPARTY" -D SPIDERMONKEY_INCDIR="${a.spidermonkey_1_8_0rc1}/include" -D SPIDERMONKEY_LIB="${a.spidermonkey_1_8_0rc1}/lib/libjs.so" ../veracity*
    '' ["minInit" "addInputs" "doUnpack"];
  
    doDeploy = a.fullDepEntry ''
      ensureDir "$out/bin" "$out/share/veracity/"
      cp -r .. "$out/share/veracity/build-dir"
  
negative.code:   inherit (s) name;
    inherit buildInputs;
  
    phaseNames = ["prepare_sgneeds" "dump0" "prepareMakefiles" "fixPaths" "doMake" "doTest" "doDeploy"];
  
    dump0 = (a.doDump "0");
  
    runTests = a.stdenv.lib.attrByPath ["runTests"] false a;
  
    doTest = a.fullDepEntry (if runTests then ''
      mkdir pseudo-home
      export HOME=$PWD/pseudo-home
      export LC_ALL=en_US.UTF-8
      ${if a.stdenv.isLinux then "export LOCALE_ARCHIVE=${a.glibcLocales}/lib/locale-archive;" else ""}
      make test || true
    '' else "") ["doMake" "minInit"];
  
  