mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-18 17:57:11 +03:00
tools: hakyll isn't in lts 7, use nightly for hakyll-std
Also compile it when run interpreted.
This commit is contained in:
parent
ff6ca9cc43
commit
eaf8853a9f
2
Makefile
2
Makefile
@ -875,7 +875,7 @@ hakyll-std site/hakyll-std/hakyll-std: \
|
||||
site/hakyll-std/hakyll-std.hs \
|
||||
site/hakyll-std/TableOfContents.hs \
|
||||
$(call def-help,hakyll-std, build a generic hakyll site builder script )
|
||||
cd site/hakyll-std; ./hakyll-std.hs >/dev/null && stack ghc hakyll-std.hs
|
||||
cd site/hakyll-std; ./hakyll-std.hs
|
||||
|
||||
site-build: site/hakyll-std/hakyll-std site/manual.md \
|
||||
$(call def-help,site-build, generate the hledger.org website with hakyll-std )
|
||||
|
9
Shake.hs
9
Shake.hs
@ -264,19 +264,14 @@ main = do
|
||||
hakyllstd %> \out -> do
|
||||
let dir = takeDirectory out
|
||||
need [out <.> "hs", dir </> "TableOfContents.hs"] -- XXX hard-coded dep
|
||||
-- install libs via shebang line
|
||||
-- XXX 2016/10/29 why has this started giving
|
||||
-- "./hakyll-std.hs: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory))"
|
||||
unit $ liftIO $
|
||||
cmd (Cwd dir) "./hakyll-std.hs --version"
|
||||
cmd (Cwd dir) "./hakyll-std.hs"
|
||||
`catch` (\(e::IOException) -> putStr $ unlines $
|
||||
["I could not run ./hakyll-std.hs in "++dir++" to install Hakyll."
|
||||
,"If you see a hakyll-std build error after this, please do it manually:"
|
||||
,"$ (cd site/hakyll-std; ./hakyll-std.hs --version)"
|
||||
,"$ (cd site/hakyll-std; ./hakyll-std.hs)"
|
||||
,"and try again."
|
||||
])
|
||||
-- compile
|
||||
cmd (Cwd dir) "stack ghc hakyll-std"
|
||||
|
||||
-- cleanup
|
||||
|
||||
|
@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env stack
|
||||
{- stack runghc --verbosity info --package hakyll --package pandoc -} -- pandoc-1.17.0.3
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- stack exec --verbosity info
|
||||
--resolver nightly
|
||||
--package hakyll
|
||||
--package pandoc
|
||||
-- ghc
|
||||
-}
|
||||
|
||||
{- |
|
||||
|
||||
A simple hakyll website builder suitable for software project sites,
|
||||
@ -31,6 +36,8 @@ $ hakyll-std [--help|clean|build|preview|...] # standard hakyll options
|
||||
|
||||
-}
|
||||
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
import Control.Monad
|
||||
import Data.Default
|
||||
import Hakyll
|
||||
|
Loading…
Reference in New Issue
Block a user