This was mentioned in #3 (closed), but it's of some interest to me as I'm adapting ghcup to work with Alpine at the moment and I'm compiling cabal-install from scratch.
It may still be overkill in the vast majority of use-cases though, so feel free to close if it's out of scope for this project.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
In this case, I’m not downloading the cabal-install binary at all. I’m downloading the cabal-install tarball from Hackage and installing it via the bootstrap.sh script in its directory.
(I’m additionally overriding bootstrap.sh’s linker variable with a patch, but that is relatively specific to my use-case and probably out-of-scope for anything that ghcup should handle directly).
The ideal scenario would be if we could get musl-supporting GHC bindists at haskell.org, but the versions in aports itself are stale, so I’ve been taking a direct approach while I figure out what exactly is needed.
I find it generally confusing to have this option since we are already basically compiling it from source in 2 steps:
download pre-built cabal-install binary
issue cabal new-install cabal-install
I suspect that doesn't work because of musl in alpine? In that case, it would make more sense to fix the missing cabal-install binary. @hvr
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Huh, I guess I missed this! I still think it would probably make sense to include a compilation function for cabal-install using the bootstrap script for completeness’ sake (e.g. for the truly paranoid who don’t want to trust external binaries). I could open a PR with my changes, if that might be more useful to discuss this, otherwise feel free to close this issue.
...so it seems that this avenue is somewhat closed to me, whereas patching both the GHC source tree and the cabal-install bootstrapping process appear to work without issue.
On the topic of having a compile-cabal option in general: ghcup isn't meant to cater to users who want to bootstrap GHC and its associated tooling, then why have the compile option for GHC at all?
If the tool provides one, it seems to make sense to provide the other, since cabal-install can be bootstrapped without a previous installation.
I never used this feature and I think most people don't. In addition, it is rather hard to support correctly across different GHC versions. It's almost like writing a package definition (PKGBUILD, APKBUILD, ebuild, ...).
The reason to support GHC compilation, imo, is more that you can mess with build-time config https://github.com/haskell/ghcup/blob/master/ghcup#L362
In order to build GHC, you already need GHC. So you're likely going to fetch a binary anyway. In order to compile cabal-install from source, you can just use cabal new-install cabal-install. That is why I don't really see the use case.
I might be willing to have "unstable" commands (and hide them by default) in case other people maintain them. I think the compile subcommand should not show up in the default --help menu.