| 2 May 2026 |
tks_123 | After doing "nix develop" from top-level dir (same dir as flake.nix dir), I can successfully "cd" into each of the subdirectories, to run "cabal build" on those two individual Haskell projects. | 16:42:58 |
tks_123 | * After doing "nix develop" from top-level dir (same dir as flake.nix dir), I can - if the second project doesn't try to depend on the first project - successfully "cd" into each of the subdirectories, to run "cabal build" on those two individual Haskell projects. | 16:43:36 |
tks_123 | However, if I add "my-haskell-library" (the first project) into the build-depends of the second project, doing "cabal build" on the second project fails, complaining that "my-haskell-library" is not found. | 16:44:27 |
tks_123 | What am I doing wrong? | 16:44:29 |
tks_123 | * However, if I add "my-haskell-library" (the first project) into the build-depends of the second project ("my-haskell-executable"), doing "cabal build" on the second project ("my-haskell-executable") fails, complaining that "my-haskell-library" is not found. | 16:45:03 |
tks_123 | Hmm after putting this into cabal.project of the second project
packages:
.
../my-haskell-library
everything seems to work. | 16:55:44 |
tks_123 | Why? | 16:55:49 |
tks_123 | I thought... the haskellPkgs in Nix was supposed to tell cabal about all known Haskell packages? | 16:56:16 |
tks_123 | So why was a cabal.project needed to make this work? | 16:56:23 |
ijouw | I would assume you need two flakes if you want to package them individually, but i am neither very proficient in flakes nor nix so i might be mistaken. | 17:54:03 |
alexfmpe | I think shellFor won't add `packages` to `ghc-pkg list` since you're asking for a shell for iterating on them | 19:18:29 |
alexfmpe | So you need cabal.project to tell cabal about the other project | 19:18:56 |
alexfmpe | You could also just have the library and the executable in the same package and not worry about this | 19:19:35 |
| 3 May 2026 |
maralorn | Also if nix would compile your library and provide it to the other package it would be that snapshot and not live. | 07:17:57 |
tks_123 | Great insights, thank you | 07:18:57 |
tks_123 | So technically cabal.project is "orthogonal" (unrelated, separate) concept entirely from what packages haskellPkgs will end up available for Haskell? | 07:20:07 |
tks_123 | I'm not sure where I got the idea those were somehow related | 07:20:28 |
| andremesquitap joined the room. | 22:52:58 |
| 4 May 2026 |
srk ⚡️ | what's the deal with staging being stuck in staging for weeks? branchoff? | 05:25:51 |
srk ⚡️ | ye https://github.com/NixOS/nixpkgs/issues/503391 | 05:28:52 |
| innocentzer0 joined the room. | 12:44:17 |
| 5 May 2026 |
| Sand Witch changed their profile picture. | 18:28:45 |
| innocentzer0 set a profile picture. | 20:34:46 |
alexfmpe | huh, our friends down the aisle seem to be doing just this | 21:06:43 |
alexfmpe | https://github.com/input-output-hk/haskell.nix/blob/19b9a5110faef1e11ea1cf723af122a532f7ef10/docs/dev/builder-v2.md | 21:06:47 |
| 6 May 2026 |
| Yogansh set a profile picture. | 03:32:52 |
Artem | so, the doctest package now provides a separate executable cabal-doctest which enjoys cabal integration via the external command interface: if you have cabal-doctest in your PATH, you can run cabal doctest, which is nice. We rely on it in Cabal development. The issue is that the cabal-doctest executable is gated by a flag. So, to install it with cabal we do something like this: cabal install doctest --flag cabal-doctest. Is there an easy way to add such a flag-gated executable in my nix-shell? For sure, a simple haskellPackagges.doctest won't cut it... | 13:46:41 |
Artem | * so, the doctest package now provides a separate executable cabal-doctest which enjoys cabal integration via the external command interface: if you have cabal-doctest in your PATH, you can run cabal doctest, which is nice. We rely on it in Cabal development. The issue is that the cabal-doctest executable is gated by a flag. So, to install it with cabal we do something like this: cabal install doctest --flag cabal-doctest. Is there an easy way to add such a flag-gated executable in my nix-shell? For sure, a simple haskellPackages.doctest won't cut it... | 13:47:14 |
srk ⚡️ | I have a PR fixing the sublib issue here, feedback welcome https://github.com/haskell/cabal/pull/11788 | 14:03:31 |
srk ⚡️ | * I have a PR fixing the sublib issue, feedback welcome https://github.com/haskell/cabal/pull/11788 | 14:04:55 |