!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

723 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.org144 Servers

Load older messages


SenderMessageTime
17 Jan 2025
@profpatsch:augsburg.oneProfpatschnrs-status: We’ve all been there, it’s the bargaining phase15:40:39
@profpatsch:augsburg.oneProfpatschdepression is next! fun!15:40:55
@profpatsch:augsburg.oneProfpatschnrs-status: fwiw https://github.com/openlab-aux/vuizvui/blob/master/pkgs/profpatsch/xdg-open/default.nix#L109-L12015:41:53
@profpatsch:augsburg.oneProfpatschhttps://github.com/openlab-aux/vuizvui/blob/master/pkgs/profpatsch/importPurescript.nix#L115:42:03
@profpatsch:augsburg.oneProfpatschit works pretty ok15:42:11
@profpatsch:augsburg.oneProfpatschjust make sure you use a static binary release of purs-to-nix, otherwise your eval time goes into the gutter with IfD15:43:11
@nrs-status:matrix.orgthirdofmay18081814goyaah neat! thanks for the references, I'll be looking at what they've done15:43:46
@nrs-status:matrix.orgthirdofmay18081814goyaah yeah that's the compiler maralorn was talking about, I haven't had time to give it a look, will begin reading15:44:11
@profpatsch:augsburg.oneProfpatschnrs-status: it’s essentially a minimal working purescript-to-nix integration15:44:35
@profpatsch:augsburg.oneProfpatschYou can just copy most of it and adapt15:44:47
@profpatsch:augsburg.oneProfpatsch(just note that it’s GPLv3, but since I’m the sole author I give you permission to relicense as you see fit)15:45:16
@nrs-status:matrix.orgthirdofmay18081814goyaoh you're the author? very cool stuff15:45:52
@nrs-status:matrix.orgthirdofmay18081814goyawill definitely ping you about this (if you're interested), because I am in it for the long ride15:46:26
@nrs-status:matrix.orgthirdofmay18081814goya* will definitely ping you about this (if you're interested), because I am in it for the long run15:46:41
@profpatsch:augsburg.oneProfpatschnrs-status: Well, it’d be interesting if somebody tries to really use this in anger15:47:41
@profpatsch:augsburg.oneProfpatschOriginally, this used the same idea with dhall-to-nix, but dhall is kind of a lost cause ino15:47:59
@profpatsch:augsburg.oneProfpatsch*imo15:48:01
@profpatsch:augsburg.oneProfpatschpurescript is not great, but works better15:48:15
@profpatsch:augsburg.oneProfpatschI’d just advise strongly against trying to compile the purescript stdlib to nix15:48:37
@profpatsch:augsburg.oneProfpatschand instead use it as a very simple nix frontend with typing15:48:48
@profpatsch:augsburg.oneProfpatsche.g. all of these are just pkgs.lib functions passed through from the nix side verbatim with type annotations https://github.com/openlab-aux/vuizvui/blob/master/pkgs/profpatsch/xdg-open/purs/XdgOpen.purs#L615:49:20
@profpatsch:augsburg.oneProfpatschI really like that you can just foreign-import named versions of + and ++ from the nix side and then create infix operators on the purescript side again15:50:48
@profpatsch:augsburg.oneProfpatschnrs-status: A major unsolved problem I have is that there’s no real way to pass things from outside to the foreign-import mechanism so far15:52:07
@profpatsch:augsburg.oneProfpatsche.g. https://github.com/openlab-aux/vuizvui/blob/master/pkgs/profpatsch/xdg-open/purs/XdgOpen.nix15:52:11
@profpatsch:augsburg.oneProfpatsch I do an import <nixpkgs> {}; here which is super wasteful 15:52:22
@profpatsch:augsburg.oneProfpatschthat’s a hard blocker15:52:25
@profpatsch:augsburg.oneProfpatschi.e. would need to patch purs-to-nix to deal with this15:52:45
@profpatsch:augsburg.oneProfpatschIn this case it was ~somwhat okay because I used only lib functions and no packages15:53:36
@profpatsch:augsburg.oneProfpatsch well, I guess I worked around it by having main be a function which takes everything it needs, but that’s not very ergonomic cause then I can’t use any of the foreign import system for that 15:54:53
@nrs-status:matrix.orgthirdofmay18081814goyahmm thanks a lot for the comments I can't totally parse yet, I'll begin reading source a bit and come back15:56:36

Show newer messages


Back to Room ListRoom Version: 6