tmattio / spin

OCaml project generator.
ISC License
297 stars 15 forks source link

Support Nix as a package manager in every template #83

Closed tmattio closed 3 years ago

citizen428 commented 4 years ago

Can you please add a bit more info in the description? I might be able to help with this.

tmattio commented 4 years ago

I'm not familiar with Nix, so this was mostly an exploration issue on my side. But from what I understand, Nix is a package manager that could replace Esy or Opam to fetch the dependencies, so the goal would be to offer Nix as an alternative to the currently supported package managers (Esy and Opam).

I'm not sure if that makes sense?

The setup could be inspired by anmonteiro's packages, which all use Nix. For instance: https://github.com/anmonteiro/piaf

citizen428 commented 4 years ago

In the case you linked Nix is not used to install the package, but to make it easier to hack on, see https://github.com/anmonteiro/piaf#option-1-setting-up-the-sandbox. 😃 nix-shell drops the user in a new shell, that will be configured (packages installed without interfering with the user's system etc.) according to nix/default.nix and the other files it sources.