Closed dinkopehar closed 1 year ago
This looks like a duplicate of https://github.com/NixOS/nixpkgs/issues/196651 (it's hard to tell because DocBook errors are not that informative...)
What branch of home-manager are you following? Are you sure you're on the latest revision?
The following information would be useful:
/nix/store/9ff1wzw2fyfj7qmpss1q6sygix4x7m9h-manual-combined/manual-combined.xml
file that fails to validate@ncfavier Thank you for quick response.
I will update this issue soon when I'm back in few hours with info you requested and try that solution in duplicate you mentioned.
I just updated nix channels so I assume I'm on latest revisions of Home manager(master), but will update to be sure.
@ncfavier Thank you for your help. Adding the mentioned (manual.manpages.enable = false;
) makes it work again 🚀
You asked about revisions, I'm not expert on Nix still but I guess:
nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
-> '23.05pre439589.298add347c2'
home-manager
and how to evaluate it, but I've run today nix-channel --update
so I assume it's from todays commit. I can add, for example, Lua config in Neovim. That feature was added few weeks ago.In conclusion, I guess it is something related to the issue you mentioned so you can close this one because it resolved problems for me.
Okay, so maybe it is a different issue. Could you paste the contents of that /nix/store/9ff1wzw2fyfj7qmpss1q6sygix4x7m9h-manual-combined/manual-combined.xml
file to https://gist.github.com/ ?
Here is the content of file you request for further investigation - https://gist.github.com/dinko-pehar/15bccbb2f04dc05746f4ab6375d3e6e0
Thanks, that's helpful.
That file fails to validate against the DocBook stylesheet because it contains <simpara>
tags inside <para>
tags, which isn't allowed (of course, the error couldn't just say that, that would be too simple...).
These errors are only present in the description for _module.args
:
I'm guessing the fix would be to remove the <para>
tags here.
It is weird that your manual is generating documentation for _module.args
, though, because that option was made invisible in https://github.com/NixOS/nixpkgs/pull/208407, which is on unstable and 22.11. Could you try updating nixpkgs?
cc @pennae for good measure
I'm guessing the fix would be to remove the
<para>
tags here.
Nope, that's not it. Still struggling to find what the error is exactly...
it looks like the current HM markdown converter is just plain wrong. always wrapping paragraphs in simpara (https://gitlab.com/rycee/nmd/-/blob/master/lib/docbookify-options-json.py#L83) plus post-conversion unwrapping (https://gitlab.com/rycee/nmd/-/blob/master/lib/docbookify-options-json.py#L274) should produce incorrect results on all block containers, which notably includes admonitions. simpara should be replaced with para in all places and unwrapping removed, we'd think
nixos/nixpkgs#215924 had pretty much the same failure not too long, there it went away with an all-channels update
So, I'm pretty sure I've got a different bug, but it is manifesting in the same/similar way as this issue. My rebuild switch starts failing at manual-combined.drv and goes on to complain about opt-targets.darwin.defaults."com.apple.Safari".blah blah blah.
But, I'm not running darwin. :-( I am, however, running on Apple hardware.(Macbook Pro 7,1)
So, I don't know, maybe same, maybe not. I'm not a coder. Can someone look over my commands and outputs and let me know if this is a new issue or not?
Thanks.
I've just updated all channels and it's still happening. I have disabled it as suggested above by @ncfavier . It's not important to me. If there is any way I could help more with this, please write.
Yeah, the validation error shows up when running
nix build -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/298add347c2.tar.gz -f. docs.html
but it seems to work with the latest Nixpkgs unstable
nix build -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz -f. docs.html
@spinkyspider that looks like an instance of https://github.com/NixOS/nixpkgs/issues/196651, i.e. caused by the changes in showOption
in nixpkgs. The fixes for that have landed in both home-manager and nix-darwin a while ago, so I suggest you update everything.
@dinko-pehar are you sure you're correctly updating the nixpkgs
channel that nix-darwin uses? Are you running nix-channel
as root or as your own user?
@ncfavier I've updated as root but now I have problems with chromium
enabled on darwin. I'll get back to you once I resolve this.
Finally, it's resolved. Many thanks to you for supporting me.
I usually ran nix-channel --update
and I assumed it updates all channels because it pulled Neovim update from few weeks ago. I didn't do sudo nix-channel --update
so this was the problem for me I think.
There are too many moving parts while maintaining everything with nix that I need to learn to be able to understand errors better. I'll try in future to help home-manager
and contribute if I can.
Thank you 👍
@fricklerhandwerk you asked about Nix UX pain points, I think this is a pretty common one: confusion about root vs. user channels. (Of course, the real problem is that the sane alternative to channels, flakes, are not stable yet...)
@spinkyspider that looks like an instance of NixOS/nixpkgs#196651, i.e. caused by the changes in
showOption
in nixpkgs. The fixes for that have landed in both home-manager and nix-darwin a while ago, so I suggest you update everything.
@ncfavier Could you clarify, for a nixos newb, what you mean by "update everything"? In my attached file I thought it shows that I updated everything. Do you mean I need to update to the bleeding edge Master branch?
Also, I looked at 196651 and it seems to be darwin specific. Am I just wrong about that? Thanks.
You're tracking the release-21.11 branch of home-manager, which is outdated. Try release-22.11.
The linked issue affects both nix-darwin and home-manager, regardless of platform.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
Since I'm running into this same problem with a fresh installation of Nix on macOS, I tried running both nix-channel --update and sudo nix-channel --update. The former succeeds, but the latter warns:
warning: $HOME ('/Users/seh') is not owned by you, falling back to the one defined in the 'passwd' file ('/var/root') unpacking channels... warning: $HOME ('/Users/seh') is not owned by you, falling back to the one defined in the 'passwd' file ('/var/root')
I can see that in my ~/.nix-defexpr directory, there are separate symbolic links: channels and _channelsroot. I'm not sure whether that's pertinent here, though.
I confirmed that my flake.lock file includes the Git commit hashes for the head commits in both the home-manager and nix-darwin repositories. What else might I need to update to get past this DocBook schema conformance problem?
Why are you using both flakes and channels?
I’m new enough to Nix that my best answer is, “I don’t know.”
I ran into the problem described here, and have been reading the advice and solutions that worked for others who asked about it before me. That led me to try the nix-channel commands.
If you're using flakes, as documented here, then channels should have no incidence at all.
How are you specifying your flake inputs, and what command are you running to get what error?
Also reported in https://github.com/nix-community/home-manager/issues/4142, this looks like it could be a new instance of this problem. Let's track the new issue there.
How are you specifying your flake inputs, and what command are you running to get what error?
Just to answer this question, I'm trying to adapt @sebastiant's dotfiles repository, first just targeting one machine running macOS. I'm rewriting as I go, not installing all the programs yet; I'm just trying to get the skeleton working.
Indeed, channels are not relevant if using flakes. To not hijack the thread: feel free to reach out to me separately if you want assistance with nix or flakes in general.
The corresponding action to update your channel would be nix flake update
https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake-update.html which will update all your flake inputs in the flake.lock file. Ill try to reproduce this on my mac from that repository tomorrow!
feel free to reach out to me separately if you want assistance with nix or flakes in general.
Where would you prefer to have these discussions that probably don't warrant issues to be filed here? As an example, I now find that the jsonnet package (still using the C++ rather than the Go port) won't build on macOS, due to ld not being able to find symbols for the "x86_64" architecture.
Are you following the right branch?
Is there an existing issue for this?
Issue description
I have my dotfiles managed by
darwin-nix
which useshome-manager
. I've updated the nix channels usingnix-channel --update
but it broke some of the things. I've disabled some of the packages that maybe require some new tweaks to work, but it still fails.I'm not sure if this is related to Nix or Home-Manager. It seems like it's trying to build some
manual-combined
/docbook
for fish completions, but it fails:Maintainer CC
Not sure ?
System information