!RbXGJhHMsnQcNIDFWN:nixos.org

Nix Haskell

604 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://nixos.org/manual/nixpkgs/unstable/#haskell | Current PR: https://github.com/nixos/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Ahaskell-updates | Maintainer Docs: https://github.com/NixOS/nixpkgs/blob/haskell-updates/pkgs/development/haskell-modules/HACKING.md | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org | Merger Schedule: https://cloud.maralorn.de/apps/calendar/p/H6migHmKX7xHoTFa/dayGridMonth/now | Join #haskell.nix:libera.chat for question about the alternative haskell.nix infrastructure123 Servers

Load older messages


SenderMessageTime
7 May 2024
@alexfmpe:matrix.orgalexfmpe
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

  1. how to make non-haskell packages available to it so you can cabal build ?
  2. how to build everything with nix including the haskell packages ?
20:22:31
@alexfmpe:matrix.orgalexfmpe
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

  1. how to make non-haskell packages (e.g. pkgconfig) available to it so you can cabal build ?
  2. how to build everything with nix including the haskell packages ?e
20:22:44
@mequbic:matrix.orgiqubic (she/her)I'm asking about #2.20:22:48
@alexfmpe:matrix.orgalexfmpehttps://github.com/Gabriella439/haskell-nix/ is a guide that goes over that workflow 20:25:14
@mequbic:matrix.orgiqubic (she/her)How can I apply it to this library?20:25:50
@alexfmpe:matrix.orgalexfmpeyou 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:matrix.orgalexfmpe also, you might want instead do
your-library = haskellPackagesNew.callCabal2nix "your-library" ./your-library. { };
20:30:11
@alexfmpe:matrix.orgalexfmpebut you really want to read what all this stuff means or it'll mean trouble eventually20:31:17
@mequbic:matrix.orgiqubic (she/her)Sure thing...20:31:28
@mequbic:matrix.orgiqubic (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:matrix.orgalexfmpehttps://github.com/Gabriella439/haskell-nix/blob/main/project2/README.md20:36:25
@alexfmpe:matrix.orgalexfmpe
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
@mequbic:matrix.orgiqubic (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
@mequbic:matrix.orgiqubic (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
@mequbic:matrix.orgiqubic (she/her)glew: https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/development/libraries/glew/default.nix#L5620:43:24
@mequbic:matrix.orgiqubic (she/her)sdl2: https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/development/libraries/SDL2/default.nix#L18220:43:42
@ners:nixos.devners
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
@mequbic:matrix.orgiqubic (she/her)Oh, cool! Would you be able to share your setup?20:44:26
@ners:nixos.devnersHere'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:nixos.devnersIf you have your code online I can have a look at it.20:45:30
@maralorn:maralorn.demaralorn
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:maralorn.demaralornMain goal is to not vendor patches in nixpkgs. Nixpkgs is too big anyway.^^21:47:43
8 May 2024
@maralorn:maralorn.demaralorn 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:maralorn.demaralornHuh, 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.:matrix.orgMangoIV what’s the status of the new cabal? Anything I can do towards getting that somewhere? 08:15:14
@maralorn:maralorn.demaralornIt will just happen next time we update the branch.08:37:10
@maralorn:maralorn.demaralornUnfortunately due too a clerical error no one is currently allocated to that task.08:38:08
@sternenseemann:systemli.orgsterni 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
* @sternenseemann:systemli.orgsterni has too irons in the fire19:51:20
@maralorn:maralorn.demaralornI 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

There are no newer messages yet.


Back to Room ListRoom Version: 6