jonascarpay / template-haskell

batteries-included nix-based haskell project template
BSD 3-Clause "New" or "Revised" License
61 stars 10 forks source link

Using documented and stable Nix CLI #10

Closed DamienCassou closed 3 years ago

DamienCassou commented 3 years ago

The CI.yml of the project uses nix build which is undocumented (except in the wiki), experimental and not installed by default with the rest of Nix. I suggest using nix-build instead. I can send a PR.

jonascarpay commented 3 years ago

not installed by default with the rest of Nix

I did not know this, is it not available on your installation?

I tend to like nix build more because its output is easier to understand, but if it's not always available it might be better to use nix-build instead.

DamienCassou commented 3 years ago

I did not know this, is it not available on your installation?

This wiki page says that the nix command is undocumented and references the nix command wiki page which says this is experimental. This latter page also discusses version 2.4 which is not released yet.

Nevertheless, it seems the nix program and its commands are activated on my system and in GitHub Actions. I just don't understand exactly why.

DamienCassou commented 3 years ago

I asked the question in discourse and got some answers explaining differences.

jonascarpay commented 3 years ago

For now I'm gonna say it's better to just use the nix command. At work I've moved all our stuff to use it as well and we haven't had any issues. Just the fact that it tells you per line what derivation produced some piece of output makes it much nicer to use than nix-build. If at some point there is a more idiomatic way of doing things with the same quality of output, or if there's some other issue with it, I'd be happy to move to some other build method.

DamienCassou commented 3 years ago

This makes sense, thank you.