Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pyrtlsdr / default.nix
blobfdd89c28460be70452696a1ec823e61cc6ef71f7
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , fetchpatch
5 , rtl-sdr
6 , setuptools
7 , pythonOlder
8 }:
10 buildPythonPackage rec {
11   pname = "pyrtlsdr";
12   version = "0.3.0";
13   format = "setuptools";
15   disabled = pythonOlder "3.7";
17   src = fetchPypi {
18     inherit pname version;
19     hash = "sha256-+z5YO6BzuGHo4LxeYvZvBzZekUf102SR3krWLyPkU2I=";
20   };
22   propagatedBuildInputs = [
23     setuptools
24   ];
26   postPatch = ''
27     sed "s|driver_files =.*|driver_files = ['${rtl-sdr}/lib/librtlsdr.so']|" -i rtlsdr/librtlsdr.py
28   '';
30   # No tests that can be used.
31   doCheck = false;
33   meta = with lib; {
34     description = "Python wrapper for librtlsdr (a driver for Realtek RTL2832U based SDR's)";
35     homepage = "https://github.com/roger-/pyrtlsdr";
36     changelog = "https://github.com/pyrtlsdr/pyrtlsdr/releases/tag/v${version}";
37     license = licenses.gpl3Plus;
38     platforms = platforms.unix;
39     maintainers = with maintainers; [ bjornfor ];
40   };