Skip to content

xorg: remove xlibsWrapper attribute, use top-level one instead#194044

Merged
SuperSandro2000 merged 6 commits intoNixOS:masterfrom
trofi:xlibsWrapper-top-level-only
Oct 2, 2022
Merged

xorg: remove xlibsWrapper attribute, use top-level one instead#194044
SuperSandro2000 merged 6 commits intoNixOS:masterfrom
trofi:xlibsWrapper-top-level-only

Conversation

@trofi
Copy link
Copy Markdown
Contributor

@trofi trofi commented Oct 2, 2022

Description of changes

xorg: remove xlibsWrapper attribute, use top-level one instead

I noticed this attribute when tried to override xorg scope via
overlay:

final: prev {
  xorg = prev.xorg.overrideScope' (f: p: {
    libXfont2 = p.libXfont2.overrideAttrs (oa: {
      patches = (oa.patches or []) ++ [
        ../libXfont2/nofollow.patch
      ];
    });
  }) // { inherit (prev) xlibsWrapper; };
}

As a result I got unexpected pulseaudio build failures:

$ nix build --no-link -f. pulseaudio
error: attribute 'xlibsWrapper' missing

       at pkgs/servers/pulseaudio/default.nix:79:37:

           78|       ++ lib.optional jackaudioSupport libjack2
           79|       ++ lib.optionals x11Support [ xorg.xlibsWrapper xorg.libXtst xorg.libXi ]
             |                                     ^
           80|       ++ lib.optional useSystemd systemd

Previous changes in this branch remove references to xorg.xlibsWrapper
in favour of xlibsWrapper. Let's remove injection of this attribute into
`xorg.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@trofi trofi force-pushed the xlibsWrapper-top-level-only branch 2 times, most recently from df2a2b3 to 267e411 Compare October 2, 2022 10:40
@ofborg ofborg bot added the 8.has: clean-up This PR removes packages or removes other cruft label Oct 2, 2022
@ofborg ofborg bot requested a review from AndersonTorres October 2, 2022 10:50
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Oct 2, 2022
@trofi trofi mentioned this pull request Oct 2, 2022
83 tasks
@AndersonTorres
Copy link
Copy Markdown
Member

Well, the only problem with this PR: all commits are labeled

<deriv>: use xorg.xlibsWrapper instead of xorg.xlibsWrapper

Please reword them to the expected

<deriv>: use xlibsWrapper instead of xorg.xlibsWrapper

trofi added 6 commits October 2, 2022 15:38
I noticed this attribute when tried to override `xorg` scope via
overlay:

    final: prev {
      xorg = prev.xorg.overrideScope' (f: p: {
        libXfont2 = p.libXfont2.overrideAttrs (oa: {
          patches = (oa.patches or []) ++ [
            ../libXfont2/nofollow.patch
          ];
        });
      }) // { inherit (prev) xlibsWrapper; };
    }

As a result I got unexpected `pulseaudio` build failures:

    $ nix build --no-link -f. pulseaudio
    error: attribute 'xlibsWrapper' missing

           at pkgs/servers/pulseaudio/default.nix:79:37:

               78|       ++ lib.optional jackaudioSupport libjack2
               79|       ++ lib.optionals x11Support [ xorg.xlibsWrapper xorg.libXtst xorg.libXi ]
                 |                                     ^
               80|       ++ lib.optional useSystemd systemd

Previous changes in this branch remove references to xorg.xlibsWrapper
in favour of xlibsWrapper. Let's remove injection of this attribute into
`xorg.
@trofi trofi force-pushed the xlibsWrapper-top-level-only branch from 267e411 to f7262e0 Compare October 2, 2022 14:39
@trofi
Copy link
Copy Markdown
Contributor Author

trofi commented Oct 2, 2022

Well, the only problem with this PR: all commits are labeled

<deriv>: use xorg.xlibsWrapper instead of xorg.xlibsWrapper

Please reword them to the expected

<deriv>: use xlibsWrapper instead of xorg.xlibsWrapper

Good point! Updated the descriptions.

@SuperSandro2000 SuperSandro2000 merged commit cfc5af3 into NixOS:master Oct 2, 2022
@trofi trofi deleted the xlibsWrapper-top-level-only branch October 2, 2022 17:33
@AndersonTorres
Copy link
Copy Markdown
Member

I will remember this to always be explicit with package listing. I notice a certain amount of novices using pkgs.<package name> recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants