Error building manual on nix-darwin install

I uninstalled nix and reinstalled it and am now trying to reinstall nix-darwin. I think I may have made the mistake of not uninstalling nix-darwin before uninstalling nix the first time. As I am trying to reinstall I am hitting the following

nix run nix-darwin – switch --flake ~/.config/nix-darwin
building the system configuration…
error: builder for ‘/nix/store/ck0rb8v02y5qbfhxwm3ppzmj5vg7aan8-darwin-manual-html.drv’ failed with exit code 1;
last 25 log lines:

Traceback (most recent call last):
File “/nix/store/6nki0jn1qxdv4y6j6h2xji0chhicf0nj-nixos-render-docs-0.0/lib/python3.12/site-packages/nixos_render_docs/init.py”, line 49, in main
manual.run_cli(args)
File “/nix/store/6nki0jn1qxdv4y6j6h2xji0chhicf0nj-nixos-render-docs-0.0/lib/python3.12/site-packages/nixos_render_docs/manual.py”, line 725, in run_cli
_run_cli_html(args)
File “/nix/store/6nki0jn1qxdv4y6j6h2xji0chhicf0nj-nixos-render-docs-0.0/lib/python3.12/site-packages/nixos_render_docs/manual.py”, line 717, in _run_cli_html
md.convert(args.infile, args.outfile)
File “/nix/store/6nki0jn1qxdv4y6j6h2xji0chhicf0nj-nixos-render-docs-0.0/lib/python3.12/site-packages/nixos_render_docs/manual.py”, line 532, in convert
super().convert(infile, outfile)
File “/nix/store/6nki0jn1qxdv4y6j6h2xji0chhicf0nj-nixos-render-docs-0.0/lib/python3.12/site-packages/nixos_render_docs/manual.py”, line 42, in convert
raise RuntimeError(f"failed to render manual {infile}") from e
RuntimeError: failed to render manual manual.md
error:
failed to render manual manual.md

caused by:

Identifiers present in the source must have a mapping in the redirects file.

  • book-darwin-manual

This can happen when an identifier was added or renamed.
Please update doc/redirects.json or nixos/doc/manual/redirects.json!

NOTE: If your Manual build passes locally and you see this message in CI, you probably need a rebase.
For full logs, run ‘nix-store -l /nix/store/ck0rb8v02y5qbfhxwm3ppzmj5vg7aan8-darwin-manual-html.drv’.
error: 1 dependencies of derivation ‘/nix/store/y5gb5rrykv3fqkm19afp5gi7414daizq-system-applications.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/0n7d7ycjk5rlym9b5qf3zc8c2d0yq2fh-darwin-system-25.05.20241116.34a6264+darwin5.2bcef10.drv’ failed to build

This appears to be a problem with state inside the nix store, so I’m not sure what the best way is to recover. Any ideas?

2 Likes

Having same issue. Started failing for me after doing nix flake update. Now every time I run darwin-rebuild switch --flake . I’m getting the same error. I’m a total beginner at nix-darwin and nothing I tried has worked so far.

1 Like

same issue here. but I cant even get a basic build to start, I followed the docs, & it failed to build, I changed the the architecture to aarch64 like it said & didnt change anything else & the build failed, nix is running just fine though, but darwin is not

There is a temporary fix for this issue provided by teekennedy on the issue #1176 of the nix-darwin github repository until this is fixed (there were some changes on the rendering of nixpkgs manual rendering apprently):

basically change :

nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

to

nixpkgs.url = "github:NixOS/nixpkgs/8809585e6937d0b07fc066792c8c9abf9c3fe5c4";
# ⓘ defines the repository for nixpkgs and nix-darwin
    # ! temporary fix for nixpkgs & nix-darwin build fail on :
    #  error: builder for '/nix/store/86459mqpi8i02zf182y96964yajz9v4d-darwin-manual-html.drv' failed with exit code 1;
    # nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    # ✏️ This error is caused by the new redirects system that got added to nixos-render-docs yesterday in this commit to nixpkgs. Running the installer with the commit pinned to the commit before the redirects system was introduced, I was able to install nix-darwin successfully. then updated the nixpkgs url before installation.
    # 🌐 https://github.com/LnL7/nix-darwin/issues/1176#issuecomment-2480752009
    nixpkgs.url = "github:NixOS/nixpkgs/8809585e6937d0b07fc066792c8c9abf9c3fe5c4";

until this is fixed

2 Likes

Will try a little later thank you!

That worked. Thanks!

1 Like