[Haskell-cafe] how to set extra-lib-dirs for a dependency in a stack project?

Johannes Waldmann johannes.waldmann at htwk-leipzig.de
Sun Jan 30 16:46:44 UTC 2022

Dear Cafe,

is it possible to specify include-dirs and extra-lib-dirs
for a dependency?

I have

* top-level project A, depends on:
* project B, depends on:
* C: external library (written in C)

I am building A with stack. I don't want to put
fixed locations (include/lib) for C  in  B.cabal,
because it depends on the (top-level) build environment of A
(e.g., my machine, or CI).

Concrete example: C = kissat SAT solver, B = Haskell API for C.
I know that, e.g., https://hackage.haskell.org/package/minisat
works around this problem by vendoring (is this the word?)
the solver's code (into B). I don't want this.

With cabal.project, I could set options for (all?) dependencies?
Would stack use this setting (will it read that file at all)?
Will I have to copy  all extra-deps source repo locations
to cabal.project?

- J.

More information about the Haskell-Cafe mailing list