depot/third_party/nixpkgs/pkgs/development/python-modules/pyrtlsdr/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

34 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 ];
};
}