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

nixos: fix fallout from #46193 #47298

Merged
merged 2 commits into from Sep 25, 2018
Merged

Conversation

oxij
Copy link
Member

@oxij oxij commented Sep 24, 2018

Motivation for this change

Fixes an issue reported in #46193 (comment).

Enabling minimal and installation-device profiles at the same time (like netboot profile does) started failing after #46193.

Things done
  • Installers in ./nixos/release.nix evaluate.

Copy link
Member

@samueldr samueldr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~/tmp/nixpkgs/nixpkgs $ git checkout master

~/tmp/nixpkgs/nixpkgs $ nix-build nixos/release.nix -A netboot
error: attribute 'manual' missing, at /Users/samuel/tmp/nixpkgs/nixpkgs/nixos/modules/services/misc/nixos-manual.nix:57:39

~/tmp/nixpkgs/nixpkgs-PR47298 $ git show | head -n1
commit 1a6ce11518af319e6029863a7f220c071ce5b467

~/tmp/nixpkgs/nixpkgs-PR47298 $ nix-build nixos/release.nix -A netboot
these derivations will be built:
[...]

👍 sorry for not catching that in the initial merge.

@oxij
Copy link
Member Author

oxij commented Sep 24, 2018 via email

@7c6f434c
Copy link
Member

Hm, it looks like just using nix-instantiate on nixos/release.nixos only instantiates derivations, but not auto-callable functions. Then again, there are tests in a non-trivial Nix data structure. Is there something like eval-release.nix in Nixpkgs for checking that things evaluate?

@oxij
Copy link
Member Author

oxij commented Sep 25, 2018 via email

@7c6f434c 7c6f434c merged commit 61abf3b into NixOS:master Sep 25, 2018
@7c6f434c
Copy link
Member

Yes, a separate question and the change looks OK.

@oxij
Copy link
Member Author

oxij commented Sep 25, 2018 via email

oxij referenced this pull request Sep 25, 2018
Introduced by 0f3b89b.

If services.nixosManual.showManual is enabled and
documentation.nixos.enable is not, there is no
config.system.build.manual available, so evaluation fails. For example
this is the case for the installer tests.

There is however an assertion which should catch exactly this, but it
isn't thrown because the usage of config.system.build.manual is
evaluated earlier than the assertions.

So I split the assertion off into a separate mkIf to make sure it is
shown appropriately and also fixed the installation-device profile to
enable documentation.nixos.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @oxij
@oxij oxij deleted the nixos/doc-in-installer branch November 18, 2018 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants