pythonPackages.pyrtlsdr: use m2r instead of pypandoc
This commit is contained in:
parent
41a2352a2f
commit
b69e99091b
@ -1,22 +1,34 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
|
, fetchpatch
|
||||||
, rtl-sdr
|
, rtl-sdr
|
||||||
, pypandoc
|
, m2r
|
||||||
, pandoc
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pyrtlsdr";
|
pname = "pyrtlsdr";
|
||||||
version = "0.2.7";
|
version = "0.2.7";
|
||||||
name = "${pname}-${version}";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "7942fe2e7821d09206002ea7e820e694094b3f964885123eb6eee1167f39b8da";
|
sha256 = "7942fe2e7821d09206002ea7e820e694094b3f964885123eb6eee1167f39b8da";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pypandoc pandoc ];
|
# Replace pypandoc dependency by m2r
|
||||||
|
# See https://github.com/roger-/pyrtlsdr/pull/78
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
url = "${meta.homepage}/commit/2b7df0b.patch";
|
||||||
|
sha256 = "04h5z80969jgdgrf98b9ps56sybms09xacvmj6rwcfrmanli8rgf";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
url = "${meta.homepage}/commit/97dc3d0.patch";
|
||||||
|
sha256 = "1v1j0n91jwpsiam2j34yj71z4h39cvk4gi4565zgjrzsq6xr93i0";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ m2r ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed "s|driver_files =.*|driver_files = ['${rtl-sdr}/lib/librtlsdr.so']|" -i rtlsdr/librtlsdr.py
|
sed "s|driver_files =.*|driver_files = ['${rtl-sdr}/lib/librtlsdr.so']|" -i rtlsdr/librtlsdr.py
|
||||||
@ -31,5 +43,5 @@ buildPythonPackage rec {
|
|||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ bjornfor ];
|
maintainers = with maintainers; [ bjornfor ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user