Skip to content

Commit

Permalink
fix: work around inability to build
Browse files Browse the repository at this point in the history
Seeing an issue like this:

    commercialhaskell/stack#157

Fix from here:

    https://stackoverflow.com/a/39019781

With this, this (ie. building updated Ferret docs) works:

    git clone https://github.com/wincent/docvim.git
    cd docvim
    pacman -S stack happy
    bin/docvim \
        -c ~/.vim/pack/bundle/opt/ferret \
        ~/.vim/pack/bundle/opt/ferret/README.md \
        ~/.vim/pack/bundle/opt/ferret/doc/ferret.txt
  • Loading branch information
wincent committed Dec 8, 2020
1 parent 8f9d1f0 commit 621a4d3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Setup.hs
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
import Distribution.Simple
main = defaultMain
import System.Environment

-- Hacking this to work based on:
--
-- https://stackoverflow.com/a/39019781
--
-- Relies on `happy` existing at /usr/bin/happy; eg. on Arch Linux:
--
-- sudo pacman -S stack happy

main = do
args <- getArgs
let args' = if elem "configure" args
then args ++ [ "--with-happy=/usr/bin/happy" ]
else args
defaultMainWithArgs args'

0 comments on commit 621a4d3

Please sign in to comment.