【发布时间】:2013-03-17 23:17:20
【问题描述】:
我希望能够搜索一个包并获得一个下载链接以及所有依赖项的列表。有没有一种简单的方法可以通过命令行或 Haskell 模块来做到这一点?
【问题讨论】:
我希望能够搜索一个包并获得一个下载链接以及所有依赖项的列表。有没有一种简单的方法可以通过命令行或 Haskell 模块来做到这一点?
【问题讨论】:
cabal(可以从cabal-install 包中获得,如果您还没有的话)可以做到这一点。我会无耻地使用我刚刚发布的universe 包作为运行示例。搜索:
sorghum:~% cabal list universe
* universe
Synopsis: Classes for types where we know all the values
Default available version: 0.0
Installed versions: 0.0
License: BSD3
* universe-th
Synopsis: Construct a Dec's ancestor list.
Default available version: 0.0.0.6
Installed versions: [ Not installed ]
Homepage: http://github.com/jfishcoff/universe-th
License: BSD3
依赖信息:
sorghum:~% cabal info universe
* universe (library)
Synopsis: Classes for types where we know all the values
Versions available: 0.0
Versions installed: 0.0
Homepage: [ Not specified ]
Bug reports: [ Not specified ]
Description: A small package, in the spirit of data-default, which allows
the munging of finite and recursively enumerable types
Category: Data
License: BSD3
Author: Daniel Wagner
Maintainer: daniel@wagner-home.com
Source repo: [ Not specified ]
Dependencies: base ==4.*, void >=0.1 && <0.6
Documentation: /home/dmwit/.cabal/x86_64/share/doc/universe-0.0/html
Cached: No
Modules:
Data.Universe
Data.Universe.Helpers
下载和解压:
sorghum:~% cabal unpack universe
Downloading universe-0.0...
Unpacking to universe-0.0/
您也可以直接下载而无需使用cabal fetch 解压缩,您可能会喜欢--no-dependencies 标志(或者可能不会)。
【讨论】:
AFAIK 当前的 hackage 没有它。但是新的has 一些基本的API 调用。它们中的大多数返回 html,但其中一些返回 JSON 表示。
【讨论】: