I had an issue where having *.cabal in .gitignore[1] made nix-build -A plutus-playground.server (from plutus-apps fail due to there being “No cabal file found”. Regardless of whether having *.cabal in .gitignore is a good idea, I wonder how did the issue come about – is the nix-build process adding files and commiting to repositories while building, or is it filtering inputs based on user’s .gitignore file?
[1] because of using package.yaml everywhere. This is perhaps a practice that has swung back to including .cabal files too given that stack recommends it and cabal has gotten better.
Right, but depending on the contents of my .gitignore is a little bit of a lottery, no? Users might add things there that they want to generally ignore, but that doesn’t necessarily match what the package authors ignored.
I essentially ran nix-build -A plutus-playground.server from within plutus-apps repo at commit 41149926c108c71831cfe8d244c83b0ee4bf5c8a.
Had had the issue for a while and hadn’t find any solutions, but today decided to start from a clean linux user – and there it did work! so started to iterate with comment things out from my configuration.nix and running nixos-rebuild until I found the line in .gitignore.
System: nixos-version is “22.05pre345234.b2737d4980a (Quokka)”, nix-build --version is “nix-build (Nix) 2.5.1”.