-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
libusb1: enable compiling with musl #71563
Conversation
@GrahamcOfBorg build pkgsMusl.libusb1 libusb1 |
This is related to the following three PRs:
|
@GrahamcOfBorg build pkgsMusl.libusb1 |
b1b809f
to
0262985
Compare
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
@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
As in #71575 (comment), I've force-pushed a change that avoids Darwin mass rebuilds. |
This has worked fine for me in static-haskell-nix so far, and no changes for non-musl; merging. |
This PR enables compiling
libusb1
with 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
gtk3
library depends oncups
, which depends onlibusb1
.You can try building this with the following command:
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @nh2 @domenkozar