[Haskell-beginners] Patch source, then pickup compile

Vlatko Basic vlatko.basic at gmail.com
Sat Sep 20 07:43:12 UTC 2014


Get (patched) package into a separate dir
$ cabal sandbox add-source /my/patched/library # Add a new add-source dependency
$ cabal install --dependencies-only            # Install it into the sandbox
$ cabal build                                  # Build the local package

This way cabal first searches in the add-source dir for any dependency, and 
builds it from there. You can add several dirs with patched packages

You can/might have to add constraints in local cabal.config file (in sandboxed 
dir) to force cabal to use the latest version of the package

If a file in any add-source dir is changed, cabal will rebuild it automatically

Take a look at cabal user guide
http://www.haskell.org/cabal/users-guide/installing-packages.html

vlatko

-------- Original Message  --------
Subject: [Haskell-beginners] Patch source, then pickup compile
From: James Toll <james at jtoll.com>
To: haskell-beginners <beginners at haskell.org>
Date: 20.09.2014 03:48

> Hi,
>
> I’m trying to install Hakyll within a cabal sandbox.  The issue I’m running into is that the current version of Pandoc doesn’t build because of this bug:
>
> https://github.com/jgm/pandoc/issues/1590
>
> The bug is a simple fix, and is fixed on github, but not in the version on hackage.  I’d like to use ‘cabal get’ to download the source, manually fix the source, then compile.  The question I have is how do I pick up the installation process after fixing the source?
>
> So far this is what I’ve done:
>
> $ mkdir hakyll
> $ cabal update
> $ cd hakyll
> $ cabal sandbox init --sandbox .
> $ cabal install -j hakyll
> [this is the spot where pandoc fails to install]
> $ cabal get pandoc-1.13.1
> $ cd pandoc-1.13.1/
> [patch the source]
>
> At this point I need to resume the compilation and installation process.  How do I do that?  Do I move back up to the parent directory and then issue the 'cabal install -j hakyll’ command again?
>
> Thanks,
>
>
> James
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>


More information about the Beginners mailing list