axoloti: use lib.getLib systemd instead of systemd.lib

This will pick the `lib` output if it exists, otherwise default to `out`.
This commit is contained in:
Florian Klink 2020-08-12 20:09:23 +02:00
parent 7361f6f252
commit 5b49f1fb0f

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit, fetchpatch }:
{ stdenv, lib, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit, fetchpatch }:
stdenv.mkDerivation rec {
name = "libusb-1.0.19";
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
preFixup = stdenv.lib.optionalString stdenv.isLinux ''
sed 's,-ludev,-L${systemd.lib}/lib -ludev,' -i $out/lib/libusb-1.0.la
sed 's,-ludev,-L${lib.getLib systemd}/lib -ludev,' -i $out/lib/libusb-1.0.la
'';
meta = with stdenv.lib; {