| 28 Nov 2025 |
linj | because it uses justStaticExecutables already | 17:11:39 |
Acid Bong | not cachix's doc, but all its dependencies' docs | 17:12:27 |
Acid Bong | * not only cachix's doc, but all its dependencies' docs | 17:12:37 |
Acid Bong | and the second part is exactly undesirable | 17:12:48 |
linj | haha, its doc depends on its dependencies' doc | 17:15:01 |
linj | You can go to its dependencies' doc by clicking hyperlinks from its doc | 17:16:39 |
Acid Bong | ah, I thought buildEnv pulls docs recursively | 17:16:41 |
linj | It's a feature! | 17:16:44 |
| 29 Nov 2025 |
maralorn | linj: re: justStaticExecutables. This is interesting. I have been advocating to replace justStaticExecutables with enableSeparateBinOutput because I was not aware of any downsides of the later (when it works. It can cause build errors because of problems with cabal). And I always found it more elegant to reuse the library output instead of just deleting it.
No I am wondering whether that was a bad direction.
| 00:09:44 |
maralorn | * linj: re: justStaticExecutables. This is interesting. I have been advocating to replace justStaticExecutables with enableSeparateBinOutput because I was not aware of any downsides of the later (when it works. It can cause build errors because of problems with cabal). And I always found it more elegant to reuse the library output instead of just deleting it.
Now I am wondering whether that was a bad direction.
| 00:09:49 |
maralorn | It is also kinda doubtful that the library docs of cachix are actually usefull docs for users of the executable. | 00:10:33 |
Acid Bong | In reply to @maralorn:maralorn.de It is also kinda doubtful that the library docs of cachix are actually usefull docs for users of the executable. yeah, cuz if they want Cachix the library, they can get haskellPackages.cachix (or shellFor {packages = h: [h.cachix];}) | 05:27:15 |
sterni | Wolfgang Walther: I could make a cabal2nix release for the next iteration, so end users on stable cabal2nix can benefit from _type etc. Not a big priority since it's somewhat fringe, but would be good to do eventually | 14:46:16 |
Wolfgang Walther | No objections! | 18:03:35 |
sellout | I’m having an issue with using a cabal-version other than the one included with GHC. There is a Cabal bug that was fixed in 3.10.3. I updated my Cabal files to include cabal-version: 3.10.3, but my packages support back to GHC 9.6.1 (and the first with Cabal 3.10.3 is GHC 9.8.3). I’ve tried overriding Cabal/Cabal-syntax/cabal-install for GHCs older than 9.8.3, but I still get the complaint “Unsupported cabal-version 3.10.3.” Interestingly, the workaround I managed to find is if I override Cabal to 3.10.3.0, but let cabal-version be set to something older, it works. Maybe this is actually the correct thing – the Cabal file can be parsed with an older Cabal, but Setup requires the non-broken one? | 18:12:15 |
Acid Bong | yup, that works, opened 466253 | 18:19:51 |
Alex | In reply to @sellout:matrix.org I’m having an issue with using a cabal-version other than the one included with GHC. There is a Cabal bug that was fixed in 3.10.3. I updated my Cabal files to include cabal-version: 3.10.3, but my packages support back to GHC 9.6.1 (and the first with Cabal 3.10.3 is GHC 9.8.3). I’ve tried overriding Cabal/Cabal-syntax/cabal-install for GHCs older than 9.8.3, but I still get the complaint “Unsupported cabal-version 3.10.3.” Interestingly, the workaround I managed to find is if I override Cabal to 3.10.3.0, but let cabal-version be set to something older, it works. Maybe this is actually the correct thing – the Cabal file can be parsed with an older Cabal, but Setup requires the non-broken one? It sounds like you should be using setup-depends: Cabal >= 3.10.3.0 because I think cabal-version is for the syntax and supported keywords in the Cabal package declaration.
https://cabal.readthedocs.io/en/3.4/cabal-package.html#pkg-field-custom-setup-setup-depends | 18:37:52 |
sellout | I’m using setup-depends already (because of another Cabal bug), and yeah, that plus the Cabal override is my workaround, which /does/ work. It’s good to hear that that distinguishing the two references to Cabal is useful. But it does leave a few open questions 1. Nix (cabal2nix?) doesn’t pay any attention to setup-depends bounds (if I don’t override Cabal, it complains that it couldn’t load the plugin, not that the bound wasn’t satisfied – which is bad for discovery); 2. my Setup doesn’t actually have a direct dependency on Cabal, so it’s odd that I have to specify it at all, and 3. it still doesn’t help in the case that I would want to have a Cabal file with syntax from a Cabal newer than the one shipped with the corresponding GHC. | 19:44:22 |
Alex | Nix doesn't use cabal-install when building. It instead compiles Setup.hs directly. That may be why setup-depends bounds are ignored. | 20:34:53 |
Alex | In reply to @sellout:matrix.org I’m using setup-depends already (because of another Cabal bug), and yeah, that plus the Cabal override is my workaround, which /does/ work. It’s good to hear that that distinguishing the two references to Cabal is useful. But it does leave a few open questions 1. Nix (cabal2nix?) doesn’t pay any attention to setup-depends bounds (if I don’t override Cabal, it complains that it couldn’t load the plugin, not that the bound wasn’t satisfied – which is bad for discovery); 2. my Setup doesn’t actually have a direct dependency on Cabal, so it’s odd that I have to specify it at all, and 3. it still doesn’t help in the case that I would want to have a Cabal file with syntax from a Cabal newer than the one shipped with the corresponding GHC. Nixpkgs always uses a specific version of every package.
The boot libraries, e.g. Cabal, are whatever version is built into that particular version of GHC.
It's still not entirely clear what you're trying to do.
Build failures because Cabal is too old is, as far as I can tell, working as intended.
Note that cabal-version is the version of the Cabal package description, not the version of Cabal the library, nor the version of cabal-install the executable.
It looks like there is no 3.10.3, so that could be why you get the "unsupported" error even when using a Cabal version that supports 3.12.
You should not change cabal-version unless you need syntax or fields from a newer version. | 20:43:06 |
| 30 Nov 2025 |
sellout | Ok, thanks, this is helpful. I didn’t realize the cabal-version couldn’t be an arbitrary Cabal version. I also didn’t realize you could use custom-setup with build-type: Simple (the manual explicitly says “A custom-setup stanza is required for Custom and Hooks build-type, and will be ignored (with a warning) for other build types.” – but it’s not ignored, thankfully), so I was thinking the cabal-version would be the only way inform users that they need to build with a particular Cabal version. | 02:03:48 |
sellout | What I’m trying to do is put ghc-options: -fplugin=NoRecursion in a Cabal file, but that’s broken in the Cabal versions bundled with GHC 9.6.1–9.8.2. | 02:09:07 |