Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 44 lines 1.1 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, fetchpatch 5, docutils 6, readme_renderer 7, packaging 8, pygments 9, mock 10}: 11 12buildPythonPackage rec { 13 pname = "restview"; 14 version = "2.9.1"; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "de87c84f19526bd4a76505f6d40b51b7bb03ca43b6067c93f82f1c7237ac9e84"; 19 }; 20 21 propagatedBuildInputs = [ docutils readme_renderer packaging pygments ]; 22 checkInputs = [ mock ]; 23 24 patches = [ 25 # fix tests after readme_renderer update 26 # TODO remove on next update 27 (fetchpatch { 28 url = "https://github.com/mgedmin/restview/commit/541743ded13ae55dea4c437046984a5f13d06e8b.patch"; 29 sha256 = "031b1dlqx346bz7afpc011lslnq771lnxb6iy1l2285pph534bci"; 30 }) 31 ]; 32 33 postPatch = '' 34 # dict order breaking tests 35 sed -i 's@<a href="http://www.example.com" rel="nofollow">@...@' src/restview/tests.py 36 ''; 37 38 meta = { 39 description = "ReStructuredText viewer"; 40 homepage = "https://mg.pov.lt/restview/"; 41 license = lib.licenses.gpl2; 42 maintainers = with lib.maintainers; [ koral ]; 43 }; 44}