神刀安全网

Edward Z. Yang: Announcing cabal new-build: Nix-style local builds

To build multiple Cabal packages, you need to first create cabal.project file in some root directory. For example, in the Cabal repository, there is a root directory with a folder per package, e.g., the folders Cabal and cabal-install . Then in cabal.project , specify each folder:

packages: Cabal/           cabal-install/

Then, in the directory for a package, you can say cabal new-build to build all of the components in that package; alternately, you can specify a list of targets to build, e.g., package-tests cabal asks to build the package-tests test suite and the cabal executable. A component can be built from any directory; you don’t have to be cd’ed into the directory containing the package you want to build. Additionally, you can qualify targets by the package they came from, e.g., Cabal:package-tests asks specifically for the package-tests component from Cabal. There is no need to manually configure a sandbox: add a cabal.project file, and it just works!

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Edward Z. Yang: Announcing cabal new-build: Nix-style local builds

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址