Nix gitignore is confusing - Rib

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

tristanC

I found the gitignore nix expression rather confusing. It seems like this could be avoided by not using the $(nix-build)/bin/... pattern, as suggested in https://github.com/Gabriel439/haskell-nix/blob/master/project0/README.md

Nix and Haskell in production. Contribute to Gabriel439/haskell-nix development by creating an account on GitHub.
Sridhar Ratnakumar

Hmm, where in neuron/rib is the $(nix-build)/bin.. pattern being suggested? (Given that our use of gitignore doesn't always behave correctly, that pattern should not be recommended).

Sridhar Ratnakumar

Oh okay. It was just an one-off thingy (to be done once, or in scripts). Normally you would just run nix-build and use whatever is in the ./result/bin directory

Sridhar Ratnakumar

cf. https://github.com/srid/rib-sample#building-the-executable

Sample site for the Rib static site generator. Contribute to srid/rib-sample development by creating an account on GitHub.
tristanC

I meant it also made the --version argument implementation more complicated. Thus I'm not sure what is the actual benefit of using the gitignore expression filter.

Sridhar Ratnakumar

To avoid unnecessary rebuilds, mainly. Also see: https://blog.hercules-ci.com/nix/2019/05/15/nix-gitignore/

Hercules CI and Cachix development blog