libusb1: use lib.getLib to find systemd.lib
This allows this package to build with eudev instead.
This commit is contained in:
parent
a1cc0f1d5f
commit
b3862e2bcf
@ -28,13 +28,8 @@ stdenv.mkDerivation (rec {
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
|
||||
|
||||
configureFlags =
|
||||
# We use `isLinux` here only to avoid mass rebuilds for Darwin, where
|
||||
# disabling udev happens automatically. Remove `isLinux` at next big change!
|
||||
stdenv.lib.optional (stdenv.isLinux && !enableSystemd) "--disable-udev";
|
||||
|
||||
preFixup = stdenv.lib.optionalString enableSystemd ''
|
||||
sed 's,-ludev,-L${systemd.lib}/lib -ludev,' -i $out/lib/libusb-1.0.la
|
||||
preFixup = stdenv.lib.optionalString stdenv.isLinux ''
|
||||
sed 's,-ludev,-L${stdenv.lib.getLib systemd}/lib -ludev,' -i $out/lib/libusb-1.0.la
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user