Closed Stinjul closed 2 years ago
Oh, yes! We used to do it with:
pkg_setup() {
enewgroup nixbld
for i in {1..64}; do
# we list 'nixbld' twice to
# both assign a primary group for user
# and add a user to /etc/group
enewuser nixbld${i} -1 -1 /var/empty nixbld,nixbld
done
}
And I completely forgot about it. And users don't seem to be wiped afresh when I migrated from user.eclass
.
Will try to reproduce locally by wiping out users entirely. Should also help testing the fix.
Got it:
# nix --extra-experimental-features nix-command --extra-experimental-features flakes build nixpkgs#gcc --rebuild
error: the build users group 'nixbld' has no members
I probably just didn't try to build anything since.
Should be fixed by nix-2.10.3-r1
. Please give it a try.
Worked perfectly, thanks!
Basically because it's the primary group for those users they don't appear in /etc/group, which in turns causes the following error for some reason:
A quick fix seems to be adding the group twice in the user ebuild like so:
After which the user gets added to nixbld in /etc/group, and
nix-channel --update
starts working.There might be a better way to fix this, but I don't think adding them to the group twice causes any issues.