purescript-cookbook icon indicating copy to clipboard operation
purescript-cookbook copied to clipboard

Better nix.shell setup via niv

Open eviefp opened this issue 5 years ago • 6 comments

The current nix setup is a bit awkward to use. Would anyone mind if I swapped it to use niv to grab easy-purescript-nix instead? niv is just a thin layer on top of fetchgit and it handles sha's automatically.

This should not mean any changes for the README or anything like that. The only change is in updating the dependency to easy-purescript-nix, by making it significantly easier.

eviefp avatar Aug 20 '20 22:08 eviefp

Pinging @danielstaleiny for input, who initially set this up in #144

milesfrain avatar Aug 20 '20 22:08 milesfrain

I’m curious to see this because I have several projects using easy-purescript-nix I have to regularly update. Do you have an existing project somewhere using this?

thomashoneyman avatar Aug 21 '20 00:08 thomashoneyman

Initial idea was to make it easier for nixos/nix users to set up this project. One of the worry I had, that if I would pull the latest, we would get more up to date version of the purescript dependencies and it could not work, so I pinned it down based on the version the project was using. I don't know if the project is always up to date with purescript latest versions and if so I think your solution would be better, otherwise pinning is better. However this is not question for me, but it is for maintainers. I think they are not using the nix so making nix working is not priority for them.

I think they would welcome version where they don't have to update nix file, I am also up for that.

danielstaleiny avatar Aug 21 '20 07:08 danielstaleiny

@thomashoneyman There is also more home cooked scripted way of doing this. This awesome guy made this script update script and how he keeps metadata for each packages metadata for neovim for example

Take it as inspiration. :)

danielstaleiny avatar Aug 21 '20 07:08 danielstaleiny

I think they are not using the nix so making nix working is not priority for them.

I'm not using nix mainly because I haven't invested the time to learn it yet. I started reading through the original thesis and stopped on page 66. It'll likely take me a few more weeks to get through the entire thing. So, a lot of this is simply over my head for the time being. I would like to support nix as it would make it trivial (I believe) to set up things besides PureScript (e.g. databases for purescript-selda), but I also realize that not all users would want to use it.

JordanMartinez avatar Aug 22 '20 01:08 JordanMartinez

My plan would still be to pin the versions. Maybe we just need a checklist when updating the compiler version for example in package.json, to also update the nix file (or at least ping someone who's comfortable doing that; I can volunteer).

eviefp avatar Aug 25 '20 19:08 eviefp