Help us understand the problem. What is going on with this article?

cabal-installで実行ファイルをインストールするプラクティス

More than 3 years have passed since last update.

追記

stack使おう。
@tanakh さんも日本語で紹介してくれてるし。

どうでもいいやつ

Haskell製のプログラムpandocとかyesod-binとかcabal-installみたいな実行ファイルをcabalでインストールしたい場合のベストじゃないかもしれないプラクティス。

mkdir -p ~/local/bin # 実行ファイル自体を置く場所
echo "export PATH='~/local/bin:$PATH'" >> ~/.bashrc # 実行ファイルのパスを追加 bashじゃないシェルを使ってる人はなんか適当に読み替える
mkdir -p ~/local/src/foobar # 実行ファイルのソース用ディレクトリ
cd ~/local/src/foobar
cabal sandbox init # cabal hellを避けるためにパッケージの依存を当該ディレクトリ内に抑える
cabal install foobar --bindir=~/local/bin
foobar --help #今回インストールした実行ファイルへのパスがちゃんと通ってるか確認してみる

おわり。

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away