我可以使用 cabal 来处理非 Haskell 库吗?
Can I use cabal to handle non-Haskell libraries?
其他包管理器已经尝试建立与其他生态系统的桥梁。例如,composer-npm-bridge, which allows to pull packages from node registry into a PHP project. Is it possible to build something like this using cabal? More concretely, how would one go about pulling packages from luarocks 进入 Haskell 项目?
原则上是可行的:使用 build-type: custom
,cabal 将编译并 运行 你的 Setup.hs
代替它自己的构建机制,你可以任意放置 Haskell Setup.hs
中的代码。或者,如果您可以将设置过程融入通常的配置-制作-制作安装过程中,那么 build-type: configure
选项可能恰到好处。
有关这些配置选项的更完整详细信息,请参阅 the user's guide。
其他包管理器已经尝试建立与其他生态系统的桥梁。例如,composer-npm-bridge, which allows to pull packages from node registry into a PHP project. Is it possible to build something like this using cabal? More concretely, how would one go about pulling packages from luarocks 进入 Haskell 项目?
原则上是可行的:使用 build-type: custom
,cabal 将编译并 运行 你的 Setup.hs
代替它自己的构建机制,你可以任意放置 Haskell Setup.hs
中的代码。或者,如果您可以将设置过程融入通常的配置-制作-制作安装过程中,那么 build-type: configure
选项可能恰到好处。
有关这些配置选项的更完整详细信息,请参阅 the user's guide。