7 May 2024 |
alexfmpe | In reply to @mequbic:matrix.org So, I've been looking into doing GUI programming with Haskell, and I see that monomer exists, and I'd love to try out that library. How can I do that on NixOS? https://github.com/fjvallarino/monomer not sure what you're asking, do you mean
- how to make non-haskell packages available to it so you can
cabal build ?
- how to build everything with nix including the haskell packages ?
| 20:22:31 |
alexfmpe | In reply to @mequbic:matrix.org So, I've been looking into doing GUI programming with Haskell, and I see that monomer exists, and I'd love to try out that library. How can I do that on NixOS? https://github.com/fjvallarino/monomer * not sure what you're asking, do you mean
- how to make non-haskell packages (e.g. pkgconfig) available to it so you can
cabal build ?
- how to build everything with nix including the haskell packages ?e
| 20:22:44 |
iqubic (she/her) | I'm asking about #2. | 20:22:48 |
alexfmpe | https://github.com/Gabriella439/haskell-nix/ is a guide that goes over that workflow | 20:25:14 |
iqubic (she/her) | How can I apply it to this library? | 20:25:50 |
alexfmpe | you do something like https://github.com/Gabriella439/haskell-nix/blob/main/project1/release5.nix but with <your-library> instead of "project1" | 20:29:09 |
alexfmpe | also, you might want instead do
your-library = haskellPackagesNew.callCabal2nix "your-library" ./your-library. { }; | 20:30:11 |
alexfmpe | but you really want to read what all this stuff means or it'll mean trouble eventually | 20:31:17 |
iqubic (she/her) | Sure thing... | 20:31:28 |
iqubic (she/her) | The main thing that I'm not sure of is how I get sdl2 and glew in scope, as this library depends on those. | 20:32:55 |
alexfmpe | https://github.com/Gabriella439/haskell-nix/blob/main/project2/README.md | 20:36:25 |
alexfmpe | In reply to @mequbic:matrix.org The main thing that I'm not sure of is how I get sdl2 and glew in scope, as this library depends on those. that's #1 though, the rest of the guide is about #2 which you originally asked about but it might have been a XY problem | 20:38:22 |
iqubic (she/her) | It was an XY problem. I already know how to use callCabal2Nix as I've been writing Haskell and compiling with Nix for quite some time now. This is my first time writing anything that relies on external (non-haskell) packages. | 20:39:41 |
iqubic (she/her) | How can I figure out which packages provide the glew and sdl2 libraries? I see from a quick search that there are packages in nixpkgs with those specific names, but I'm not sure if those are the right packages to use. | 20:42:59 |
iqubic (she/her) | glew: https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/development/libraries/glew/default.nix#L56 | 20:43:24 |
iqubic (she/her) | sdl2: https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/development/libraries/SDL2/default.nix#L182 | 20:43:42 |
ners | In reply to @mequbic:matrix.org How can I figure out which packages provide the glew and sdl2 libraries? I see from a quick search that there are packages in nixpkgs with those specific names, but I'm not sure if those are the right packages to use. Oh hey, I'm currently working with Nix + Haskell + SDL2. 👋 | 20:44:05 |
iqubic (she/her) | Oh, cool! Would you be able to share your setup? | 20:44:26 |
ners | Here's the flake: https://github.com/ners/rhine-sdl2/blob/master/flake.nix
Though I see I'm not doing anything exotic in there for sdl2 specifically ... | 20:44:54 |
ners | If you have your code online I can have a look at it. | 20:45:30 |
maralorn | In reply to @alexfmpe:matrix.org hmm maralorn I guess less disruptive thing is to grab your bounds PR and modify it manually to get higher bounds ? Just push a another commit onto my branch and make a new PR with it. Or use your PR. We can also swap the patches currently in nixpkgs to use your PR. Whatever is cleaner. Maybe squashing a few commits makes it a bit less painful. | 21:45:51 |
maralorn | Main goal is to not vendor patches in nixpkgs. Nixpkgs is too big anyway.^^ | 21:47:43 |
8 May 2024 |
maralorn | sterni: I will be afk until Sunday, but I fixed hls and I hledger-ui can be broken for a moment. | 21:00:22 |
maralorn | Huh, I realize that I failed to fix our merger calendar. Which is really odd. So it's kinda no-ones turn rn. | 22:23:52 |
9 May 2024 |
MangoIV | what’s the status of the new cabal? Anything I can do towards getting that somewhere? | 08:15:14 |
maralorn | It will just happen next time we update the branch. | 08:37:10 |
maralorn | Unfortunately due too a clerical error no one is currently allocated to that task. | 08:38:08 |
sterni | maralorn: okay, I'd really like to have https://github.com/NixOS/cabal2nix/pull/619 reviewed so I can make a new distribution-nixpkgs release before the next rotation for some more js backend fixes | 19:50:45 |
| * sterni has too irons in the fire | 19:51:20 |
maralorn | I am willing to merge https://github.com/NixOS/nixpkgs/pull/257730 soon. But it's a nontrivial api change so if anyone has concerns please come forward. | 21:51:32 |