fallback to cabal if cabal-dev is unavailable
separate library from tests