libusb1: enable compiling with musl#71563
Merged
nh2 merged 1 commit intoNixOS:masterfrom Oct 28, 2019
Merged
Conversation
Member
Author
|
@GrahamcOfBorg build pkgsMusl.libusb1 libusb1 |
This was referenced Oct 21, 2019
Member
Author
|
This is related to the following three PRs:
|
10 tasks
Member
Author
|
@GrahamcOfBorg build pkgsMusl.libusb1 |
nh2
requested changes
Oct 22, 2019
b1b809f to
0262985
Compare
Member
Author
|
There was a good suggestion by @nh2 to add a top-level I have done this in f4fc02e. You can see how this $ nix-build -A libusb1
...
/nix/store/4v7wlxmhch7q9nvv125bzcdfzki5vzdv-libusb-1.0.23
$ nix show-derivation ./result | grep -i systemd
"/nix/store/q42ibginb26cr9xs1vly9b5gxjjzzw3i-systemd-243.drv": [
...
$ nix-build -E 'with import ./. {}; libusb1.override { enableSystemd = false; }'
...
/nix/store/8awlhj1cmphpaycgvs742r4p7vya1gz5-libusb-1.0.23
$ nix show-derivation ./result | grep -i systemd # no deps on systemd...
$ nix-build -A pkgsMusl.libusb1
...
/nix/store/qqq6bgrsxd28wqy4cd6npwcv4hz1d3qv-libusb-1.0.23
$ nix show-derivation ./result | grep -i systemd # no deps on systemd
$ |
0262985 to
f4fc02e
Compare
Member
Author
|
@GrahamcOfBorg build pkgsMusl.libusb1 |
libusb1 can't depend on systemd in order to be compiling with musl, because systemd can't be built with musl. Since systemd provides udev, udev support needs to be disabled when building libusb1.
f4fc02e to
08c0172
Compare
Contributor
|
As in #71575 (comment), I've force-pushed a change that avoids Darwin mass rebuilds. |
nh2
approved these changes
Oct 26, 2019
Contributor
|
This has worked fine for me in static-haskell-nix so far, and no changes for non-musl; merging. |
60 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enables compiling
libusb1with musl.libusb1 can't depend on systemd in order to be compiled with musl, because systemd can't be built with musl.
Since systemd provides udev, udev support also needs to be disabled when building libusb1.
Motivation for this change
This is motivated by nh2/static-haskell-nix#50. I'd like to build GTK apps with musl. The
gtk3library depends oncups, which depends onlibusb1.You can try building this with the following command:
Things done
sandboxinnix.confon non-NixOS)nix-shell -p nix-review --run "nix-review wip"./result/bin/)nix path-info -Sbefore and after)Notify maintainers
cc @nh2 @domenkozar