Rebuild is failing

cursed fix… we compare diff between upstream and ours and copy paste the changes and force push them to the releases.

I can’t imagine trying to update that with our master later on would possibly be a fun time, though.

1 Like

Is there any possible workaround for this issue for the time being?

using upstream is the only fix we can provide. The team maintaining the soft fork is pretty much just me and anyone else who swings in. so pretty much just @srxl lol

Everyone else is focused on breaking up the mono repo.

2 Likes

Fine by me. I wish there were something I could do to help beyond bringing bugs to attention, but sadly I am only an eel.

2 Likes

do you use home-manager ?

1 Like

I do use it. Could that be causing the issue?

1 Like

i managed to reproduce the bug and i’m trying to understand what happening.
Could you try adding --keep-failed or --verbose to your build command ?

2 Likes

In my case from what i’m observing is when building the home-manager derivation it’s get stuck at the man-cache.drv

1 Like

I did both --keep-failed and --verbose.

Here's the log
~
❯ sudo nixos-rebuild switch --verbose        
$ nix --extra-experimental-features nix-command flakes build --out-link /tmp/nixos-rebuild.wqXL1J/nixos-rebuild /home/mark/.nix-config#nixosConfigurations."xerxes".config.system.build.nixos-rebuild --verbose
$ exec /nix/store/nrcawyapp6yksmvcqk2qmkiw89msfkmk-nixos-rebuild/bin/nixos-rebuild switch --verbose
building the system configuration...
Building in flake mode.
$ nix --extra-experimental-features nix-command flakes build /home/mark/.nix-config#nixosConfigurations."xerxes".config.system.build.toplevel --verbose --out-link /tmp/nixos-rebuild.qUyvDY/result
these 20 derivations will be built:
  /nix/store/3a53pgwvvk6nwgwd26n4k95a5vyb3awd-nixos-manual-html.drv
  /nix/store/k364wxcv4qdpbf1fssb0i9bzbmzi7dxj-nixos-configuration-reference-manpage.drv
  /nix/store/sx91zn80qdwzs44igkpk3v16rvisafw5-nixos-help.drv
  /nix/store/r5z2xczwf7r15bp399mlzrbmgpynbyws-nixos-help.drv
  /nix/store/mlzljzl0wycnyix3ahgyv3pp3m68rpv0-system-path.drv
  /nix/store/0imwg3yfzw5am9nm5njibr8b9bp7azhg-etc-pam-environment.drv
  /nix/store/frqj1m3ag6sa00ngmb6xj69w7afpy9j3-dbus-1.drv
  /nix/store/1p792s3ydlcw8z0wjrd9x4r5wixqnc5a-X-Restart-Triggers-dbus.drv
  /nix/store/fwlqp4wvjp8m4np3007q972why2ry4ha-unit-dbus.service.drv
  /nix/store/1xnsa7k2968affcf2fma49liqjdb8nxf-user-units.drv
  /nix/store/9x7qqqw7nfk1zpnfbzz9iy9wmpbcrimj-set-environment.drv
  /nix/store/crgffg4y11j2k5623yrkyvhkdkd481k9-X-Restart-Triggers-polkit.drv
  /nix/store/awm5zzqkr11q8h71a61a34rnf83n3c5n-unit-polkit.service.drv
  /nix/store/c6k9zr2alvma6lpg7j809aqcmqcddcl5-etc-zshenv.drv
  /nix/store/wrv93zmkgdi8fx0sgxn7y1gp3m8iyi7z-unit-dbus.service.drv
  /nix/store/xwfi58gfx7fqdlp6yywnprjx29x04frz-unit-accounts-daemon.service.drv
  /nix/store/ihcmmrry0775z4xhy5dcxvy1x8krbzc5-system-units.drv
  /nix/store/kj9pqbvv74mgk8xzbblym77jnr2wdzvc-etc-profile.drv
  /nix/store/by07vapk237fn8l9vm53b4m5m67za50k-etc.drv
  /nix/store/mrpfi5f7f14ma9ih9jrah6i4n7smpiav-nixos-system-xerxes-24.05.20240505.39c77ff.drv
building '/nix/store/k364wxcv4qdpbf1fssb0i9bzbmzi7dxj-nixos-configuration-reference-manpage.drv'...
building '/nix/store/3a53pgwvvk6nwgwd26n4k95a5vyb3awd-nixos-manual-html.drv'...
error: output '/nix/store/mk27j9i8md7cps2yg9l41g5jnfg3i3zy-nixos-configuration-reference-manpage' is not allowed to refer to the following paths:
         /nix/store/i83sm9a66g3z6hb5l214xbp8nhb6xk1i-nixos
error: 1 dependencies of derivation '/nix/store/mlzljzl0wycnyix3ahgyv3pp3m68rpv0-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/mrpfi5f7f14ma9ih9jrah6i4n7smpiav-nixos-system-xerxes-24.05.20240505.39c77ff.drv' failed to build

~ 22s
❯ sudo nixos-rebuild switch --keep-failed
building the system configuration...
error: output '/nix/store/mk27j9i8md7cps2yg9l41g5jnfg3i3zy-nixos-configuration-reference-manpage' is not allowed to refer to the following paths:
         /nix/store/i83sm9a66g3z6hb5l214xbp8nhb6xk1i-nixos
note: keeping build directory '/tmp/nix-build-nixos-manual-html.drv-0'
note: keeping build directory '/tmp/nix-build-nixos-configuration-reference-manpage.drv-0'
error: 1 dependencies of derivation '/nix/store/mlzljzl0wycnyix3ahgyv3pp3m68rpv0-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/mrpfi5f7f14ma9ih9jrah6i4n7smpiav-nixos-system-xerxes-24.05.20240505.39c77ff.drv' failed to build

1 Like

Temporary fix i can propose is to set “documentation.nixos.enable = false;” in your nixos config it’s prevent the bug from happening but you will not have local man/html/json doc. It’s might be because of a conflict between home-manager and auxolotl doc generation ?

3 Likes

Thanks for the workaround, I can verify it works. I upgraded to Lix and Auxolotl (Lixolotl? Auxolixl?) during my lunch break. Super easy :grin:

2 Likes

Working on a new release now! hopefully this should fix it.

8 Likes

The proximal cause is this part of the k3s module:

That gets globbed in to a JSON file to build the docs:

$ nix derivation show .#nixosConfigurations.carrot-cake.config.system.build.manual.nixos-configuration-reference-manpage | grep json
      "buildCommand": "# Generate manpages.\nmkdir -p $out/share/man/man5\nnixos-render-docs -j $NIX_BUILD_CORES options manpage \\\n  --revision 'release-24.05' \\\n  /nix/store/pn0xzd4zqy9jb73a1cxing8sjl5ii4r8-options.json/share/doc/nixos/options.json \\\n  $out/share/man/man5/configuration.nix.5\n",
      "/nix/store/0mg10aaafjan67r9sxfdpm683903n3xv-options.json.drv": {
$ jq < /nix/store/3vpy95191rc3h3gnyi2qsviy2n5392gf-options.json/share/doc/nixos/options.json | grep -e '-nixos'
      "text": "{\n  configs = {\n    \"registry.example.com:5000\" = {\n      auth = {\n        password = \"\";\n        username = \"\";\n      };\n      tls = {\n        ca_file = /nix/store/1in11x9pg68idxncvxlzdclpnbhs6ikf-nixos/modules/services/cluster/k3s/path;\n        cert_file = /nix/store/1in11x9pg68idxncvxlzdclpnbhs6ikf-nixos/modules/services/cluster/k3s/path;\n        key_file = /nix/store/1in11x9pg68idxncvxlzdclpnbhs6ikf-nixos/modules/services/cluster/k3s/path;\n      };\n    };\n  };\n  mirrors = {\n    \"docker.io\" = {\n      endpoint = [\n        \"https://registry.example.com:5000\"\n      ];\n    };\n  };\n}"

So the simple solution is commenting out that example in the module. I’m not sure why this doesn’t break upstream’s build though.

1 Like

oh it doesn’t break in upstream because registries is a new option for aux =P

Fix available here: nixos/k3s: fix `registries` docs by sapphire-arches · Pull Request #64 · auxolotl/nixpkgs · GitHub

3 Likes

Thank you so much. (filler)

I’ve cherry picked the commits and pushed them to the respective branches. The problem should now be solved.

2 Likes

Sorry didn’t mean to lock the topic, I tried to mark a solution.

2 Likes