Customizing a package in a snapshot

瀏覽次數:6 次
跳到第一則未讀訊息

Jean-Marc Notin

未讀,
2016年6月6日 清晨7:05:332016/6/6
收件者:Stackage
Hi,

I am facing a problem with a package from Stackage, namely
pandoc-citeproc. But i guess my issue is not specific to
pandoc-citeproc.

To do its job, pandoc-citeproc relies on several data files; the path
to these files is hard-coded at compile time. Yet, everything works
fine using stack; the problem arise when I want to run my application
outside the stack environment : pandoc-citeproc complains about not
finding its data-files.

Fortunately, pandoc-citeproc offers a flag at compile time that embed
the data files in the binary package. So when I was using Cabal only,
I could manually compile pandoc-citeproc enabling that flag. But now
that I am using Stack, I did not find a similar workaround.
Specifically, I found a way in the documentation to pass flags to
extra deps packages, but not to packages from the stackage snapshot.

Is there a way to force a flag when compiling a package from a
snapshot ? Or at least is there a way to force stack to use a
customized version of a package ?

Thank you for your help !

--
Jean-Marc Notin

Michael Snoyman

未讀,
2016年6月9日 中午12:36:152016/6/9
收件者:Jean-Marc Notin、Stackage
If you add pandoc-citeproc to your extra-deps, you should be able to override the flag. In addition, it might make sense to modify the Stackage configuration (see the flags section of https://github.com/fpco/stackage/blob/master/build-constraints.yaml) to set that flag by default, if you'd like to send a PR to do so.


--
Jean-Marc Notin

--
You received this message because you are subscribed to the Google Groups "Stackage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stackage+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jean-Marc Notin

未讀,
2016年6月10日 下午2:31:462016/6/10
收件者:Stackage
Hi,

Thank you for your answer ! Indeed, I missed the 'extra-deps' thing.
Actually, it was documented in the Stackage's FAQ[1]. Shame on me...

[1] http://docs.haskellstack.org/en/stable/faq/#i-need-to-use-a-different-version-of-a-package-than-what-is-provided-by-the-lts-haskell-snapshot-im-using-what-should-i-do

Best,
--
Jean-Marc Notin

Dan Burton

未讀,
2016年6月10日 下午3:00:382016/6/10
收件者:Jean-Marc Notin、Stackage
Perhaps we should additionally encourage the pandoc-citeproc package to enable this flag by default.
-- Dan Burton
回覆所有人
回覆作者
轉寄
0 則新訊息