Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 17.09 35 lines 805 B view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, rtl-sdr 5, pypandoc 6, pandoc 7}: 8 9buildPythonPackage rec { 10 pname = "pyrtlsdr"; 11 version = "0.2.5"; 12 name = "${pname}-${version}"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "dd041143b68628c713c2227c78c40b0b4a0cb5d08df116f7bdc5f83c529be0e4"; 17 }; 18 19 buildInputs = [ pypandoc pandoc ]; 20 21 postPatch = '' 22 sed "s|driver_files =.*|driver_files = ['${rtl-sdr}/lib/librtlsdr.so']|" -i rtlsdr/librtlsdr.py 23 ''; 24 25 # No tests that can be used. 26 doCheck = false; 27 28 meta = with lib; { 29 description = "Python wrapper for librtlsdr (a driver for Realtek RTL2832U based SDR's)"; 30 homepage = https://github.com/roger-/pyrtlsdr; 31 license = licenses.gpl3; 32 platforms = platforms.linux; 33 maintainers = with maintainers; [ bjornfor ]; 34 }; 35}