LoginSignup
3
3

More than 5 years have passed since last update.

Hackage管理されているパッケージの開発版をcabal installする方法

Last updated at Posted at 2014-10-26

Haskell(というかGHC)の話題です。特定のパッケージについて、Hackageにアップロードされているバージョンが古いような場合に、GitHub上の最新ソースコードからcabal installする方法を紹介します。

ちなみに、僕はbed-and-breakfastというパッケージを使おうと思ったのですが、2014/10現在、Hackageからcabal installしようとするとGHC 7.8.3では失敗してしまいます。この問題はGitHub上の最新版なら修正されているとのことで、これをインストールしてみました。

$ git clone https://github.com/scravy/bed-and-breakfast.git
$ cd bed-and-breakfast
$ cabal check
The following warnings are likely affect your build negatively:
* Instead of 'ghc-options: -cpp' use 'extensions: CPP'

Hackage would reject this package.
$ cabal configure
Resolving dependencies...
Configuring bed-and-breakfast-0.5...
Warning: Instead of 'ghc-options: -cpp' use 'extensions: CPP'
$ cabal sdist
Source tarball created: dist/bed-and-breakfast-0.5.tar.gz
$ cabal install dist/bed-and-breakfast-0.5.tar.gz
Resolving dependencies...
Configuring bed-and-breakfast-0.5...
Building bed-and-breakfast-0.5...
Installed bed-and-breakfast-0.5
Updating documentation index /Users/hnw/Library/Haskell/share/doc/index.html
$

要は、cabalファイルを元にパッケージングして、それをインストールしているだけです。

参考にした文章

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3