···12121313 buildInputs = [ cmake pkgconfig libusb1 ];
14141515- # Building with -DINSTALL_UDEV_RULES=ON tries to install udev rules to
1616- # /etc/udev/rules.d/, and there is no option to install elsewhere. So install
1717- # rules manually.
1515+ # TODO: get these fixes upstream:
1616+ # * Building with -DINSTALL_UDEV_RULES=ON tries to install udev rules to
1717+ # /etc/udev/rules.d/, and there is no option to install elsewhere. So install
1818+ # rules manually.
1919+ # * Propagate libusb-1.0 dependency in pkg-config file.
1820 postInstall = ''
1921 mkdir -p "$out/etc/udev/rules.d/"
2022 cp ../rtl-sdr.rules "$out/etc/udev/rules.d/99-rtl-sdr.rules"
2323+2424+ pcfile="$out"/lib/pkgconfig/librtlsdr.pc
2525+ grep -q "Requires:" "$pcfile" && { echo "Upstream has added 'Requires:' in $(basename "$pcfile"); update nix expression."; exit 1; }
2626+ echo "Requires: libusb-1.0" >> "$pcfile"
2127 '';
22282329 meta = with stdenv.lib; {