2017-08-25 11:17:54 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, rtl-sdr
|
2017-09-02 16:41:05 +02:00
|
|
|
, pypandoc
|
|
|
|
, pandoc
|
2017-08-25 11:17:54 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyrtlsdr";
|
2017-10-25 20:04:35 +02:00
|
|
|
version = "0.2.7";
|
2017-08-25 11:17:54 +02:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-10-25 20:04:35 +02:00
|
|
|
sha256 = "7942fe2e7821d09206002ea7e820e694094b3f964885123eb6eee1167f39b8da";
|
2017-08-25 11:17:54 +02:00
|
|
|
};
|
|
|
|
|
2017-09-02 16:41:05 +02:00
|
|
|
buildInputs = [ pypandoc pandoc ];
|
|
|
|
|
2017-08-25 11:17:54 +02:00
|
|
|
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.linux;
|
|
|
|
maintainers = with maintainers; [ bjornfor ];
|
|
|
|
};
|
|
|
|
}
|