Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: installation fails with XML validation errors #3342

Closed
2 tasks done
samuela opened this issue Oct 18, 2022 · 9 comments
Closed
2 tasks done

bug: installation fails with XML validation errors #3342

samuela opened this issue Oct 18, 2022 · 9 comments
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@samuela
Copy link
Contributor

samuela commented Oct 18, 2022

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

When attempting to install home-manager I get an error:

$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
$ nix-channel --update
$ export NIX_PATH="${NIX_PATH:+$NIX_PATH:}$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels"
$ nix-shell "<home-manager>" -A install

Creating initial Home Manager generation...

/nix/store/qn4kqfm880dmiqnvfkr1xrnysw9mg60p-home-manager/bin/home-manager: line 90: NIX_PATH: unbound variable
Uh oh, the installation failed! Please create an issue at

    https://github.com/nix-community/home-manager/issues

if the error seems to be the fault of Home Manager.
cs-satze7x4cv-gpu-1666135490% export NIX_PATH="${NIX_PATH:+$NIX_PATH:}$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels"

cs-satze7x4cv-gpu-1666135490% nix-shell "<home-manager>" -A install

Creating initial Home Manager generation...

these 13 derivations will be built:
  /nix/store/9zi214l5svynzllk6rwxw59184rmyjwb-read-pkg-3.0.0.tgz.drv
...
  /nix/store/10vjwcyrwzz9zzd1xng0w280fx7w48rk-home-manager-generation.drv
building '/nix/store/c7m3ica6ij2jcnh4lg008fpnmnyrsz3j-reconstructpackagelock.js.drv'...
building '/nix/store/fvgbb7hgq4dcnh159xvza3bs3hvnn029-manual-combined.drv'...
/nix/store/sm91qc9l8spxzgdj934q1kwycb1pmq7a-nmd-documents/nmd-result/home-manager-options.xml:12215: validity error : xml:id : attribute value opt-targets.darwin.currentHostDefaults."com.apple.controlcenter".BatteryShowPercentage is not an NCName
...
/nix/store/cif6ymv9cf9p7vw0y517a08qhbsa3yw5-manual-combined/manual-combined.xml fails to validate
error: builder for '/nix/store/fvgbb7hgq4dcnh159xvza3bs3hvnn029-manual-combined.drv' failed with exit code 3;
       last 10 log lines:
       > /nix/store/cif6ymv9cf9p7vw0y517a08qhbsa3yw5-manual-combined/manual-combined.xml:1391: element variablelist: Relax-NG validity error : Did not expect element variablelist there
       >   1387        </section>
       >   1388      </chapter>
       >   1389       <appendix xml:id="ch-options">
       >   1390   <title>Configuration Options</title>
       >   1391    <variablelist xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="home-manager-options" xml:base="nmd-result/home-manager-options.xml"><varlistentry><term xlink:href="#opt-_module.args" xml:id="opt-_module.args"><option>_module.args</option></term><listitem><para/><para><emphasis>Type:</emphasis> lazy attribute set of raw value</para><para><emphasis>Declared by:</emphasis></para><simplelist><member><filename xlink:href="https://github.com/nix-community/home-manager/blob/master/lib/modules.nix#blob-path">
       >   1392                        &lt;home-manager/lib/modules.nix&gt;
       >   1393                        </filename></member></simplelist></listitem></varlistentry><varlistentry><term xlink:href="#opt-accounts.email.accounts" xml:id="opt-accounts.email.accounts"><option>accounts.email.accounts</option></term><listitem><para>List of email accounts.</para><para><emphasis>Type:</emphasis> attribute set of (submodule)</para><para><emphasis>Default:</emphasis> <literal>
       >
       > /nix/store/cif6ymv9cf9p7vw0y517a08qhbsa3yw5-manual-combined/manual-combined.xml fails to validate
       For full logs, run 'nix log /nix/store/fvgbb7hgq4dcnh159xvza3bs3hvnn029-manual-combined.drv'.
error: 1 dependencies of derivation '/nix/store/ym8dqrljqkclsw8wygwmx6vfi7y74f0k-man-pages.drv' failed to build
error: 1 dependencies of derivation '/nix/store/44k3mrb00m4yjyyn1n0ys1sn9p6zbf7a-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/10vjwcyrwzz9zzd1xng0w280fx7w48rk-home-manager-generation.drv' failed to build
Uh oh, the installation failed! Please create an issue at

    https://github.com/nix-community/home-manager/issues

if the error seems to be the fault of Home Manager.

Full log: https://gist.github.com/samuela/e4b0c8362e32f8fcfffcd8acc088d511

Maintainer CC

@rycee @ncfavier @aakropotkin

System information

- system: `"x86_64-linux"`
 - host os: `Linux 5.4.0-1089-gcp, Ubuntu, 18.04.6 LTS (Bionic Beaver), nobuild`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.1`
 - channels(root): `"nixpkgs"`
 - channels(sam.ainsworth): `"home-manager"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
@samuela samuela added bug triage Issues or feature request that have not been triaged yet labels Oct 18, 2022
@samuela
Copy link
Contributor Author

samuela commented Oct 18, 2022

I just tried switching home-manager to track 22.05, but alas no change.

$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.05.tar.gz home-manager
$ nix-channel --update
$ nix-shell "<home-manager>" -A install
... same thing ...

@samuela
Copy link
Contributor Author

samuela commented Oct 18, 2022

I'm also able to reproduce this with a completely "blank" home.nix config:

{ config, pkgs, ... }:
{
  home.username = "sam.ainsworth";
  home.homeDirectory = "/home/sam.ainsworth";

  home.stateVersion = "22.05";
  programs.home-manager.enable = true;
}

@samuela
Copy link
Contributor Author

samuela commented Oct 19, 2022

Workaround: add manual.manpages.enable = false; to home-manager config

@samuela
Copy link
Contributor Author

samuela commented Oct 19, 2022

Btw, just noticed that even when manpages are disabled HM still gives the same intro message after the install is finished:

All done! The home-manager tool should now be installed and you can edit

    /home/sam.ainsworth/.config/nixpkgs/home.nix

to configure Home Manager. Run 'man home-configuration.nix' to
see all available options.

which is misleading

@mfenniak
Copy link

mfenniak commented Oct 19, 2022

Seems to be an "upstream" nixpkgs issue: NixOS/nixpkgs#196651.

@gilice
Copy link

gilice commented Oct 19, 2022

Related: https://gitlab.com/rycee/nmd

As I understand, it's upstream, but not nixpkgs, instead the doc framework?

@rycee
Copy link
Member

rycee commented Oct 20, 2022

Hopefully fixed now.

@ein-shved
Copy link

Hmm faced with something similar while upgrading to 22.11. Here is the log. Disabling manuals in home-manager allowed to proceed. Should I create new issue?

austinharris pushed a commit to austinharris/home-manager that referenced this issue Dec 23, 2022
@cognivore
Copy link

cognivore commented Jan 27, 2023

@ein-shved how did you do it? documentation is no longer a key and I can't find the new way to disable it.

Read the code, found the keys. Adding this fixes to home.nix the issue:

  # Some weird bug
  manual.manpages.enable = false;
  manual.html.enable = false;
  manual.json.enable = false;

spacekookie pushed a commit to spacekookie/home-manager that referenced this issue Feb 10, 2023
Infinidoge added a commit to Infinidoge/universe that referenced this issue Mar 30, 2023
Results in a buildfailure, revert after home-manager updates to fix it
themselves.
See nix-community/home-manager#3342
Infinidoge added a commit to Infinidoge/universe that referenced this issue Mar 30, 2023
Results in a buildfailure, revert after home-manager updates to fix it
themselves.
See nix-community/home-manager#3342
Infinidoge added a commit to Infinidoge/universe that referenced this issue Mar 31, 2023
Results in a buildfailure, revert after home-manager updates to fix it
themselves.
See nix-community/home-manager#3342
t3rro added a commit to drzln/nix that referenced this issue Apr 7, 2023
t3rro added a commit to drzln/nix that referenced this issue Apr 7, 2023
t3rro added a commit to drzln/nix that referenced this issue Apr 7, 2023
t3rro added a commit to drzln/nix that referenced this issue Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

8 participants