As per haskell/cabal#2015, it seems Cabal caches the $PATH when running configure and reuses it later. As a result, if a package needs a particular program on $PATH at compile time, a user who modifies their $PATH after a failure will continue to remain in a failure state until running a stack clean. Perhaps the $PATH should be considered an input dependency of configure steps?