Skip to content

Conversation

sysedwinistrator
Copy link

Description

This is meant to address #5311.

I've felt compelled to do something about this after reading a comment by a user who said they've nearly given up transitioning from Arch to NixOS + home-manager because of it.

While it does not fix the issue of the check failing because of run-time dependencies not being available in the checkPhase; it should make it easier for users to understand what is going on and how to work around it.

Checklist

  • Change is backwards compatible.

  • Code formatted with nix fmt or
    nix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt.

  • Code tested through nix run .#tests -- test-all or
    nix-shell --pure tests -A run.all. some unrelated anki test is currently failing?

  • Test cases updated/added. See
    example. I don't think this needs a test

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and
    recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See
      example.
    • Generate a news entry. See
      News
    • Basic tests added. See
      Tests
  • If this PR adds an exciting new feature or contains a breaking change.

    • Generate a news entry. See
      News

${pkgs.xvfb-run}/bin/xvfb-run ${cfg.package}/bin/sway --config "$target" --validate --unsupported-gpu || {
echo "Checking the sway config file failed. Normally, this happens because there are errors in the config file."
echo "But the check can also fail if the sway config file has dependencies on configuration that is not available in the Nix build sandbox (e.g. custom keyboard layouts defined in the NixOS configuration; background images in the user's home directory)."
echo "In that case, it may be necessary to set 'config.wayland.windowManager.sway.checkConfig = false;'."
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
echo "In that case, it may be necessary to set 'config.wayland.windowManager.sway.checkConfig = false;'."
echo "In that case, it may be necessary to set 'wayland.windowManager.sway.checkConfig = false;'."

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.

2 participants