evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / pyrtlsdr / default.nix
blob21a3b1b4bd1ab4753fb9f58ab6fe14934a631443
2   lib,
3   buildPythonPackage,
4   fetchPypi,
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 = [ setuptools ];
24   postPatch = ''
25     sed "s|driver_files =.*|driver_files = ['${rtl-sdr}/lib/librtlsdr.so']|" -i rtlsdr/librtlsdr.py
26   '';
28   # No tests that can be used.
29   doCheck = false;
31   meta = with lib; {
32     description = "Python wrapper for librtlsdr (a driver for Realtek RTL2832U based SDR's)";
33     homepage = "https://github.com/roger-/pyrtlsdr";
34     changelog = "https://github.com/pyrtlsdr/pyrtlsdr/releases/tag/v${version}";
35     license = licenses.gpl3Plus;
36     platforms = platforms.unix;
37     maintainers = with maintainers; [ bjornfor ];
38   };