# "The manual appears to depend on the location of Nixpkgs"

**URL:** https://discourse.nixos.org/t/the-manual-appears-to-depend-on-the-location-of-nixpkgs/19183
**Category:** Help
**Created:** [May 16, 2022, 11:20pm UTC](https://discourse.nixos.org/t/the-manual-appears-to-depend-on-the-location-of-nixpkgs/19183 "2022-05-16T23:20:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rrix](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rrix/32/3673_2.png) [@rrix](https://discourse.nixos.org/u/rrix)
#### Post date: [May 16, 2022, 11:20pm UTC](https://discourse.nixos.org/t/the-manual-appears-to-depend-on-the-location-of-nixpkgs/19183/1 "2022-05-16T23:20:02Z")

</div>

I can build my configuration.nix and deploy it in [abfd31179174133ab8131139d650297bf4da63b7](https://github.com/NixOS/nixpkgs/compare/abfd31179174133ab8131139d650297bf4da63b7...d2fc6856824cb87742177eefc8dd534bdb6c3439) 13 days ago but for the last week or so i get an absurd error if I do any subsequent builds off of the configuration when I switch to it.

- nix channel --update
- morph deploy # works
- morph deploy # fails
- nix channel --rollback to known-working nixpkgs+nixos
- morph deploy # still fails!
- switch-to-configuration to the previous build
- morph build # works

```auto
error: 1 dependencies of derivation '/nix/store/05fn8wprjnf3kwszjsnx8nfj7wgc4pzr-generated-docbook.drv' failed to build
error: 1 dependencies of derivation '/nix/store/96j4h13sap7j1jf5h16p12plwhixbabv-nixos-manual-combined.drv' failed to build
error: 1 dependencies of derivation '/nix/store/h38lqvqq71fh7qipg466lv0k7c7nw8im-nixos-manpages.drv' failed to build
error: 1 dependencies of derivation '/nix/store/w54xvpy47w68v84624l805w9zdnm7dfv-nixos-manual-html.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nr42kfzl867180gyy9la55q1nc8w23nd-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/qmn52h53cr6j2x8zv9nkl2f35pwkh36q-nixos-system-virtuous-cassette-22.05pre378108.556ce9a40ab.drv' failed to build

```

The system is failing to generate the manual for _every_ option in nixpkgs afaict containing a relative path pointing to the version of nixpkgs:

```auto
          <string value="3y2ymjdad71ilw7rpl71xwsj0pv9js36-nixpkgs/nixpkgs/nixos/modules/rename.nix" />
          <string value="3y2ymjdad71ilw7rpl71xwsj0pv9js36-nixpkgs/nixpkgs/nixos/modules/services/x11/desktop-managers/cinnamon.nix" />
          <string value="3y2ymjdad71ilw7rpl71xwsj0pv9js36-nixpkgs/nixpkgs/nixos/modules/system/etc/etc.nix" />
          <string value="3y2ymjdad71ilw7rpl71xwsj0pv9js36-nixpkgs/nixpkgs/nixos/modules/system/etc/etc.nix" />
          <string value="3y2ymjdad71ilw7rpl71xwsj0pv9js36-nixpkgs/nixpkgs/nixos/modules/system/etc/etc.nix" />
          <string value="3y2ymjdad71ilw7rpl71xwsj0pv9js36-nixpkgs/nixpkgs/nixos/modules/system/etc/etc.nix" />
          <string value="3y2ymjdad71ilw7rpl71xwsj0pv9js36-nixpkgs/nixpkgs/nixos/modules/system/etc/etc.nix" />
[...redacting much of this]
          <string value="3y2ymjdad71ilw7rpl71xwsj0pv9js36-nixpkgs/nixpkgs/nixos/modules/virtualisation/qemu-vm.nix" />
          <string value="3y2ymjdad71ilw7rpl71xwsj0pv9js36-nixpkgs/nixpkgs/nixos/modules/virtualisation/qemu-vm.nix" />
The manual appears to depend on the location of Nixpkgs, which is bad
since this prevents sharing via the NixOS channel. This is typically
caused by an option default that refers to a relative path (see above
for hints about the offending path).

```

`3y2ymjdad71ilw7rpl71xwsj0pv9js36` is the version of nixpkgs which the system was built for after running the `nix-channel --update`, and the version which the system is switched to.

I really am not sure what to make of this or any indication what could be wrong between my nixos, nixpkgs, and upstream… I don’t change any `documentation.*` options and I _do_ use `man configuration.nix` often enough that I can’t simply disable this and get on with my life 😕 i’m not above bisecting the 2000 commits between here and there, but obviously i’d rather not since it’s a pretty invasive and time consuming thing to have to do on my live system.

anyone have an idea/lead/advice?

---

<div class="post-metadata">

### Author: ![rrix](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rrix/32/3673_2.png) [@rrix](https://discourse.nixos.org/u/rrix)
#### Post date: [May 26, 2022, 8:55pm UTC](https://discourse.nixos.org/t/the-manual-appears-to-depend-on-the-location-of-nixpkgs/19183/2 "2022-05-26T20:55:27Z")

</div>

```auto
[nix-shell:~/Code/nixpkgs]$ cat /etc/os-release | grep BUILD_ID
BUILD_ID="22.05.git.41cc1d5d958"

```

well, i still don’t have a solution or root cause to this incredibly frustrating situation, but “somehow” a morph deploy with `NIX_PATH=nixos=/home/rrix/Code/nixpkgs/nixos:nixpkgs=/home/rrix/Code/nixpkgs` from the misbehaving machine to a nixos mule i set up worked, and then from there I could morph deploy back to the misbehaving machine an “up to date” nixpkgs and derivation set.

I still cannot update without setting `NIX_PATH`, though…

I guess i just won’t use channels for now and update my nixpkgs checkout this way, keep my mule machine up to date, and pray that it continues to work. Though I’m now missing the binary cache for some big GUI applications like kstars and telegram-desktop which is kind of harshing my vibe.

---

<div class="post-metadata">

### Author: ![Artturin](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@Artturin](https://discourse.nixos.org/u/Artturin)
#### Post date: [May 28, 2022, 1:42am UTC](https://discourse.nixos.org/t/the-manual-appears-to-depend-on-the-location-of-nixpkgs/19183/3 "2022-05-28T01:42:25Z")

</div>

If you use the commit for nixos-unstable listed here [https://status.nixos.org/](https://status.nixos.org/) then you shouldn’t have cache misses

---

<div class="post-metadata">

### Author: ![Artturin](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@Artturin](https://discourse.nixos.org/u/Artturin)
#### Post date: [May 28, 2022, 1:47am UTC](https://discourse.nixos.org/t/the-manual-appears-to-depend-on-the-location-of-nixpkgs/19183/4 "2022-05-28T01:47:37Z")

</div>

Having a reproducer flake or something would make it much more likely that someone will look in to it

Maybe this has something to do with morph so I suggest checking their issues and filing one if there’s not one already

---

<div class="post-metadata">

### Author: ![rrix](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rrix/32/3673_2.png) [@rrix](https://discourse.nixos.org/u/rrix)
#### Post date: [May 29, 2022, 1:06am UTC](https://discourse.nixos.org/t/the-manual-appears-to-depend-on-the-location-of-nixpkgs/19183/5 "2022-05-29T01:06:14Z")

</div>

> If you use the commit for nixos-unstable listed here [https://status.nixos.org/](https://status.nixos.org/) then you shouldn’t have cache misses

yep, i shouldn’t; i have a script which is polling [channels.nix.gsc.io](https://channels.nix.gsc.io/nixpkgs-unstable/latest) to checkout the latest channel status when I update my clone, and much of the things _weren’t_ missing the cache but a handful of apps were even though I don’t customize them. _shrug_

anyways home-manager recreates `~/.nix-defexpr` and then the nix-daemon nixos module sticks that path at the front of NIX\_PATH unconditionally every time i invoke my deploy so this hack isn’t very long-term sustainable, but it’s Good Enough until I get fed up enough to wipe and reinitialize this system.

I can’t really get a flake of this system, or even replicate the issue on another machine running the same derivation (barring hardware-configuration etc) so I’m as lost as any one else would be … believe me i searched morph, nixpkgs, etc, issues trying to figure out what to debug or if anyone had seen this before – there is [1 google search result](https://github.com/NixOS/nixpkgs/issues/1459) (the second result is this thread, the third result is the code which emits the error) for that error message which was closed in 2014 with “better handling” of symlink nixpkgs…

If it happened with my overridden `NIX_PATH` nixpkgs i could at least stick traces in to the docbook module to chase it down but since _that_ copy of nixpkgs works I cannot without making my nix store `rw` and mucking about in it.
