Description
What is your question?
I need to build a program locally using cabal-install without internet access.
The build environment only includes GHC and cabal-install; no additional packages are installed. Therefore, all build dependencies must be available locally in some form.
Many modern statically linked languages (such as Rust and Go) provide a dependency vendoring mechanism to address this issue. Is it possible to achieve something similar using the native cabal-install tools?
System information
- GNU/Linux
cabal
- 3.14.2.0GHC
- 9.6.6
Additional context
For my purposes, I wrote a small script that creates a local repository with all the required package dependencies.
https://github.com/lRespublica/cabal-vendor
However, I’m still running into a few issues. For example, it's not possible to specify a relative path for the repository location, so I have to resort to using sed
hacks during the build process - which isn't ideal.
That’s why I’m asking this question here - maybe I’m going about this the wrong way.