Before the fix:
```sh
$ grep Version result/lib/pkgconfig/librtlsdr.pc
Version: v0.8.x-xxx-xunknown
```
It causes problem while building projects that use librtlsdr:
```sh
-- Checking for module 'librtlsdr>=0.5.4'
-- Requested 'librtlsdr >= 0.5.4' but version of RTL-SDR Library is v0.8.x-xxx-xunknown
```
After the fix:
```sh
$ grep Version result/lib/pkgconfig/librtlsdr.pc
Version: 0.8.0
```
rtl-sdr latest release 0.6.0 is from 2018. Six months ago master received
a patch[1] to use improved udev rules that chown to plugdev instead of
making the devices world-read-writable.
This change backports [1] as an upstream patch.
[1] b281473156
This patch partially fixes#81985.
Cross-compiling rtl-sdr is possible using this patch.
Use nix build -f <nixpkgs-path> -A pkgsCross.raspberryPi.rtl-sdr to build rtl-sdr.
The error that occured when trying to do this before was as follows:
/nix/store/ldb2v2z0198abkp2minr9a9vz5np4mn4-cmake-3.16.4-armv6l-unknown-linux-gnueabihf/nix-support/setup-hook: line 107: cmake: command not found