Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

rtl-sdr: add "Require: libusb-1.0" to pkg-config file

So that building 3rd party code works out of the box. (E.g. building
dump1090[1] works now).

[1]: https://github.com/antirez/dump1090

+9 -3
+9 -3
pkgs/applications/misc/rtl-sdr/default.nix
··· 12 12 13 13 buildInputs = [ cmake pkgconfig libusb1 ]; 14 14 15 - # Building with -DINSTALL_UDEV_RULES=ON tries to install udev rules to 16 - # /etc/udev/rules.d/, and there is no option to install elsewhere. So install 17 - # rules manually. 15 + # TODO: get these fixes upstream: 16 + # * Building with -DINSTALL_UDEV_RULES=ON tries to install udev rules to 17 + # /etc/udev/rules.d/, and there is no option to install elsewhere. So install 18 + # rules manually. 19 + # * Propagate libusb-1.0 dependency in pkg-config file. 18 20 postInstall = '' 19 21 mkdir -p "$out/etc/udev/rules.d/" 20 22 cp ../rtl-sdr.rules "$out/etc/udev/rules.d/99-rtl-sdr.rules" 23 + 24 + pcfile="$out"/lib/pkgconfig/librtlsdr.pc 25 + grep -q "Requires:" "$pcfile" && { echo "Upstream has added 'Requires:' in $(basename "$pcfile"); update nix expression."; exit 1; } 26 + echo "Requires: libusb-1.0" >> "$pcfile" 21 27 ''; 22 28 23 29 meta = with stdenv.lib; {