nixpkgs/pkgs/development/python-modules/pyrtlsdr/default.nix
Alex Auvolat 87354cb640 pyrtlsdr: 0.2.7 -> 0.2.93
This removes the need for a patch that was used before, and removes the
dependency on the m2r package which is broken
2023-06-05 11:02:53 +02:00

35 lines
774 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, rtl-sdr
, setuptools
}:
buildPythonPackage rec {
pname = "pyrtlsdr";
version = "0.2.93";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-LeKbtOQDcIinjokBK8LMhLc9xFxgYIsot9kD9ikjuiY=";
};
propagatedBuildInputs = [ setuptools ];
postPatch = ''
sed "s|driver_files =.*|driver_files = ['${rtl-sdr}/lib/librtlsdr.so']|" -i rtlsdr/librtlsdr.py
'';
# No tests that can be used.
doCheck = false;
meta = with lib; {
description = "Python wrapper for librtlsdr (a driver for Realtek RTL2832U based SDR's)";
homepage = "https://github.com/roger-/pyrtlsdr";
license = licenses.gpl3;
platforms = platforms.unix;
maintainers = with maintainers; [ bjornfor ];
};
}