I’m a bit shaky on the application of overlays and would appreciate help.
I have my own repo of a few nix packages.
In the repo’s file structure they are in a folder called ./pkgs/ and have their own subfolders.
At the toplevel I have a ./default.nix syndicating them all.
That already works how I want it to, as in I can build it with nix-build ./default.nix and install packages from it e.g. with nix-env -iA package1 -f ./default.nix.
Now, I want to have ./another_default.nix, that I can build with nix-build ./another_default.nix
It should just apply the following single overlay and otherwise just do what the original does:
I think it was the very debugging , that caused the segfault. I had a “stdenv.lib.traceVal defaultTerminal” in ./pkgs/package1 from before your post, when I was trying things. If take it out, stuff builds. With it it takes a minute or so not printing anything, then it segfaults. My guess would be, the traceVal does some kind of memory allocation and causes the overlay to recurse infinitely. Allocation segfaults before the thing hits the recursion limit or something, if that is at all plausible.