2017-09-07 09:01:51 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2018-09-13 10:21:19 +01:00
|
|
|
, fetchpatch
|
2017-09-07 09:01:51 +01:00
|
|
|
, docutils
|
|
|
|
, readme_renderer
|
2020-06-08 20:23:52 +01:00
|
|
|
, packaging
|
2017-09-07 09:01:51 +01:00
|
|
|
, pygments
|
|
|
|
, mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "restview";
|
2018-06-12 17:47:06 +01:00
|
|
|
version = "2.9.1";
|
2017-09-07 09:01:51 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-06-12 17:47:06 +01:00
|
|
|
sha256 = "de87c84f19526bd4a76505f6d40b51b7bb03ca43b6067c93f82f1c7237ac9e84";
|
2017-09-07 09:01:51 +01:00
|
|
|
};
|
|
|
|
|
2020-06-08 20:23:52 +01:00
|
|
|
propagatedBuildInputs = [ docutils readme_renderer packaging pygments ];
|
2017-09-07 09:01:51 +01:00
|
|
|
checkInputs = [ mock ];
|
|
|
|
|
2018-09-13 10:21:19 +01:00
|
|
|
patches = [
|
|
|
|
# fix tests after readme_renderer update
|
|
|
|
# TODO remove on next update
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/mgedmin/restview/commit/541743ded13ae55dea4c437046984a5f13d06e8b.patch";
|
|
|
|
sha256 = "031b1dlqx346bz7afpc011lslnq771lnxb6iy1l2285pph534bci";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2017-09-07 09:01:51 +01:00
|
|
|
postPatch = ''
|
|
|
|
# dict order breaking tests
|
|
|
|
sed -i 's@<a href="http://www.example.com" rel="nofollow">@...@' src/restview/tests.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "ReStructuredText viewer";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://mg.pov.lt/restview/";
|
2017-09-07 09:01:51 +01:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
maintainers = with lib.maintainers; [ koral ];
|
|
|
|
};
|
2018-06-27 21:12:57 +01:00
|
|
|
}
|