Haskell in Nixpkgs/NixOS | 748 Members | |
| For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org | 149 Servers |
| Sender | Message | Time |
|---|---|---|
| 1 May 2026 | ||
| * https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-mkShell-attributes | 15:07:56 | |
try inputsFrom | 15:08:04 | |
| Thanks! I will try inputsFrom, I don't have any clue about the differences. | 15:12:54 | |
| my link should explain it | 15:15:50 | |
| * my link above explains them | 15:15:59 | |
| you probably want the same for libllvm and libclang | 15:17:55 | |
| can we improve the whole https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/configuration-darwin.nix is littered with
I also run into it for some packages on darwin
| 16:45:24 | |
| * can we improve the whole https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/configuration-darwin.nix is littered with
I also run into it for some packages on darwin
| 16:45:47 | |
| huh, wait, maybe that's not the same "security" ? hard to tell with case insensitive system | 16:47:08 | |
| 2 May 2026 | ||
In reply to @alexfmpe:matrix.orgthat looks like the internal linker trying to load the Security framework, but I don’t think that’s available as a static archive, so won’t work at all in pkgsStatic?! | 07:30:00 | |
| Hi all | 16:39:50 | |
| Redacted or Malformed Event | 16:40:28 | |
| I have this flake.nix: https://pastebox.io/api/paste/3WT3DwMK6KZz | 16:41:56 | |
| 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 | |
| * 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 | |
| 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 | |
| What am I doing wrong? | 16:44:29 | |
| * 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 | |
| Hmm after putting this into
everything seems to work. | 16:55:44 | |
| Why? | 16:55:49 | |
| I thought... the haskellPkgs in Nix was supposed to tell cabal about all known Haskell packages? | 16:56:16 | |
| So why was a cabal.project needed to make this work? | 16:56:23 | |
| 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 | |
| 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 | |
| So you need cabal.project to tell cabal about the other project | 19:18:56 | |
| 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 | ||
| 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 | |
| Great insights, thank you | 07:18:57 | |
So technically cabal.project is "orthogonal" (unrelated, separate) concept entirely from what packages haskellPkgs will end up available for Haskell? | 07:20:07 | |
| I'm not sure where I got the idea those were somehow related | 07:20:28 | |