| 30 Sep 2025 |
MangoIV | (Fwiw same applies for GHC bindist) | 16:09:50 |
MangoIV | A FOD would be good | 16:10:04 |
maralorn | I mean, we somehow use ghc bindists in nixpkgs, right?^^ | 16:10:38 |
maralorn | I don’t even know what our derivations for that do differently from ghcup. 😄 | 16:10:55 |
maralorn | A fod of what? | 16:11:12 |
Teo (he/him) | I was just reading the binary GHC bindist code. There's a bit of complexity there, but it's mostly just using patchelf to provide the C deps | 16:12:36 |
Teo (he/him) | The Haskell libs come from relative paths and that apparently complicates the patchelf stuff somehow | 16:13:43 |
MangoIV | HLS. Just let cabal solve it, maybe use something like francescos thing | 16:14:06 |
MangoIV | Basically excempt the annoying things from the package set and just let cabal solve for them and install the static binary | 16:15:41 |
MangoIV | Then you build one per GHC and that’s it. | 16:15:57 |
Teo (he/him) | Isn't there a thing about how GHC/HLS can't be statically linked | 16:16:20 |
MangoIV | Oh I mean Haskell static linking? | 16:16:37 |
MangoIV | Fwiw it’s not important. I basically just mean, cut off the binary so the closure isn’t huge | 16:17:27 |
maralorn | Yeah, no. Not possible if you want to support TH. | 16:17:51 |
Teo (he/him) | Yeah that sounds reasonable. We basically do this at work with haskell.nix but I wouldn't recommend that since haskell.nix has horrible eval times | 16:18:04 |
maralorn | (The static linking thing.) | 16:18:26 |
MangoIV | That’s the Hadrian bug right | 16:18:49 |
maralorn | I don’t think so. | 16:19:02 |
maralorn | I think it’s because HLS uses another linker when it is statically linked and that linker sucks at linking in splices. | 16:19:31 |
MangoIV | Ah HLS | 16:19:44 |
MangoIV | I thought *at all^ | 16:19:49 |
MangoIV | * I thought at all ^^ | 16:19:56 |
maralorn | Ah, right. | 16:20:05 |
maralorn | But that is about statically linking system dependencies. While for HLS I thought we are debating statically linking Haskell dependencies which works fine and is default for basically every other Haskell binary we compile. | 16:21:13 |
MangoIV | Oh wow so even that doesn’t work | 16:22:16 |
MangoIV | Interesting | 16:22:19 |
MangoIV | And confusing | 16:22:22 |
maralorn | Yeah, and re: Great idea. Would work. I am hoping for someone to port that from haskell.nix to nixpkgs for years. | 16:24:40 |
MangoIV | Do you know francescos thingy? | 16:25:31 |
MangoIV | What is it called | 16:25:42 |