Skip to content

Commit

Permalink
Add ~/.cabal/bin to PATH on boot, run cabal update and install c2hs d…
Browse files Browse the repository at this point in the history
…uring VM provisioning
  • Loading branch information
michaelklishin committed Mar 13, 2012
1 parent e1bdef6 commit 5887fab
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ci_environment/haskell/files/default/cabal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

export PATH=$HOME/.cabal/bin:$PATH
24 changes: 24 additions & 0 deletions ci_environment/haskell/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,30 @@
end
end

script "initialize cabal" do
interpreter "bash"
user node.travis_build_environment.user
cwd node.travis_build_environment.home

environment Hash['HOME' => node.travis_build_environment.home]

code <<-SH
cabal update
cabal install c2hs
SH

# triggered by haskell-platform installation
action :nothing
end

package "haskell-platform" do
action :install

notifies :run, resources(:script => "initialize cabal")
end

cookbook_file "/etc/profile.d/cabal.sh" do
owner node.travis_build_environment.user
group node.travis_build_environment.group
mode 0755
end

0 comments on commit 5887fab

Please sign in to comment.