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

libinput: split utilities to a bin output #42193

Merged
merged 1 commit into from Aug 30, 2018

Conversation

jameysharp
Copy link
Contributor

Motivation for this change

libinput builds some executables which are useful for debugging or unusual configurations, but not necessary in normal use of the library. (See libinput(1) and the other referenced man pages.)

Some of these programs require Python, which makes the closure significantly larger. Splitting /libexec/ and /bin/ to a separate "bin" output allows systems that don't need these utilities to avoid the substantial size hit.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

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

Nice! 👍 Should go through the staging branch though.

@jameysharp
Copy link
Contributor Author

Awesome, thanks for reviewing! I'm not sure I understand though. Did I need to do something different for this pull request?

@fpletz
Copy link
Member

fpletz commented Jun 19, 2018

Yeah, please base your commit on staging (force-push) and change the target branch of this PR to staging (via edit). The reason for this is because this is a mass rebuild (see the labels) and should therefore be prebuilt by hydra from the staging branch before hitting master so people using master don't have to rebuild the world. :)

@jameysharp
Copy link
Contributor Author

Got it, will do. Thank you!

libinput builds some executables which are useful for debugging or
unusual configurations, but not necessary in normal use of the library.
(See libinput(1) and the other referenced man pages.)

Some of these programs require Python, which makes the closure
significantly larger. Splitting /libexec/ and /bin/ to a separate "bin"
output allows systems that don't need these utilities to avoid the
substantial size hit.
Copy link
Member

@peti peti left a comment

Choose a reason for hiding this comment

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

Most people expect out to contain those binaries, and they won't know to look for bin. That name feels wee not non-descriptive.

@vcunat vcunat merged commit ae09fe2 into NixOS:staging Aug 30, 2018
@vcunat
Copy link
Member

vcunat commented Aug 30, 2018

Amended in ab539ab.

@jameysharp
Copy link
Contributor Author

Thank you @vcunat! But doesn't this mean that all the existing references to libinput need to be changed to libinput.out? Here's the list, I think:

  • applications/window-managers/orbment/default.nix
  • applications/window-managers/sway/default.nix
  • applications/window-managers/velox/swc.nix
  • applications/window-managers/weston/default.nix
  • desktops/enlightenment/efl.nix
  • desktops/gnome-3/core/mutter/default.nix
  • desktops/plasma-5/kwin/default.nix
  • development/libraries/qt-5/modules/qtbase.nix
  • development/libraries/wlc/default.nix
  • development/libraries/wlroots/default.nix
  • servers/x11/xorg/overrides.nix

tools/inputmethods/libinput-gestures/default.nix is an interesting case because it actually wants the binaries, so it doesn't need to change.

@Ericson2314
Copy link
Member

Anything that wants the libraries probably is actually using the dev output for headers too, so it should be OK?

@jameysharp
Copy link
Contributor Author

Oh! I didn't realize buildInputs and similar things use dev or out if possible, rather than just the default output. Now I've found chooseDevOutputs and that explains a few things... Okay, this seems great!

@vcunat
Copy link
Member

vcunat commented Aug 31, 2018

Yes, all the references I see seem OK. There's been lots of effort put into the multiple-output framework to cover the most common cases automatically.

@jameysharp jameysharp deleted the libinput-split-bin branch July 8, 2019 18:38
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

6 participants