Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
TheSetup/puppet/modules/haskell/manifests/debian.pp
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
74 lines (65 sloc)
1.78 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # == haskell for debian | |
| # | |
| # Only tested on jessie | |
| # | |
| class haskell::debian { | |
| package {[ | |
| # Libraries needed for xmonad stuffs | |
| 'libxrandr-dev', | |
| 'libx11-dev', | |
| 'zlib1g-dev', | |
| 'libxft-dev', | |
| 'libxpm-dev', | |
| 'cabal-install', | |
| 'ghc', | |
| 'happy', | |
| 'alex', | |
| 'darcs', | |
| ]: | |
| require => Exec['apt-get update'], | |
| } | |
| ::haskell::install{ [ | |
| 'xmobar', | |
| 'pandoc', | |
| 'yeganesh', | |
| ]: | |
| require => Exec['apt-get update'], | |
| } | |
| exec { 'cabal update': | |
| unless => 'test -f /root/.cabal/packages/hackage.haskell.org/00-index.tar.gz', | |
| environment => 'HOME=/root', | |
| require => Package['cabal-install'], | |
| } | |
| exec { 'grab-latest-contrib': | |
| command => 'darcs get http://code.haskell.org/XMonadContrib', | |
| unless => 'test -d /root/XMonadContrib', | |
| cwd => '/root', | |
| require => Package['darcs'], | |
| } | |
| exec { 'grab-latest-xmonad': | |
| command => 'darcs get http://code.haskell.org/xmonad', | |
| cwd => '/root', | |
| unless => 'test -d /root/xmonad', | |
| require => Package['darcs'], | |
| } | |
| exec { 'xmonad-and-xmonad-contrib': | |
| command => 'cabal install --global /root/xmonad /root/XMonadContrib', | |
| onlyif => 'test -z "$(ghc-pkg list --simple-output xmonad-contrib)"', | |
| require => [ | |
| Exec['grab-latest-xmonad'], | |
| Exec['grab-latest-contrib'], | |
| Exec['cabal update'], | |
| ], | |
| } | |
| } | |
| define haskell::install ( | |
| $pkg = $title | |
| ) { | |
| exec { "cabal-${name}": | |
| command => "cabal install --global ${pkg}", | |
| environment => 'HOME=/root', | |
| timeout => 0, | |
| require => Exec['cabal update'], | |
| unless => "test -x /usr/local/bin/${pkg}"; | |
| } | |
| } |