You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.0
GHC - 9.6.6
Additional context
For my purposes, I wrote a small script that creates a local repository with all the required package dependencies.
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.
The text was updated successfully, but these errors were encountered:
There's a section in the source guide on vendoring. If you have local source code repositories for all of the dependencies then a cabal.project with local paths will pick up the dependencies locally.
source-repository-package
type: git
location: /home/... -- full path to local git repo with dependencypackages: .
You could have two project too, one for local offline use and another for when online.
Yes, I saw it, but it doesn't support automatic dependency resolution - only manual downloading of packages. On top of that, it requires editing the cabal.project file, which feels just as hacky as setting up a local repository.
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
cabal
- 3.14.2.0GHC
- 9.6.6Additional 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.
The text was updated successfully, but these errors were encountered: