从“local hackage”安装软件包(通过cabal) [英] Installing packages (via cabal) from "local hackage"

查看:171
本文介绍了从“local hackage”安装软件包(通过cabal)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以获得cabal




  • 下载一个特定的包源代码,包括所有的依赖包源代码。

  • 在稍后阶段(当不再依赖互联网连接时),通过cabal从本地下载的文件安装这些软件包,自动按照正确的顺序安装,以便构建所需的软件包?



我知道您可以使用 cabal unpack 来查看源代码一个特定的包,但我不知道如何实现上述。另外请注意,在这篇文章中无法让cabal更新工作内部公司网络有人提到,这可以做到,但说明对我来说不够具体。

> cabal help | grep fetch

  fetch下载软件包供以后安装。 b 



$ b示例: code> $ cabal fetch unbound
正在解析依赖项...
正在下载RepLib-0.5.3.1 ...
正在下载类型相等-1.1.1 ...
正在下载unbound-0.4.1.1 ...

运行 cabal install unbound 在稍后阶段不需要访问互联网。


Is it possible to get cabal to

  • Download a particular package source, including all dependency packages sources.
  • At a later stage (when internet connectivity can no longer be relied upon) install these packages via cabal, from the locally downloaded files, automatically in the right order so that the desired package is build?

I know that you can use cabal unpack to view the source of a particular package, but I am not sure how to achieve above. Also note that in this post Can't get cabal update to work inside corporate network it was mentioned that this could be done, but the instructions were not specific enough for me.

解决方案

cabal help | grep fetch:

fetch        Downloads packages for later installation.

Example:

$ cabal fetch unbound
Resolving dependencies...
Downloading RepLib-0.5.3.1...
Downloading type-equality-0.1.1...
Downloading unbound-0.4.1.1...

Running cabal install unbound at a later stage won't require Internet access.

这篇关于从“local hackage”安装软件包(通过cabal)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆