@@ -0,0 +1,77 @@
1+{ lib
2+, buildPythonApplication
3+, fetchPypi
4+# build inputs
5+, aiofiles
6+, aiohttp
7+, attrs
8+, certifi
9+, cssselect
10+, html5lib
11+, isodate
12+, json-home-client
13+, lxml
14+, pillow
15+, pygments
16+, requests
17+, result
18+, setuptools
19+, tenacity
20+, widlparser
21+}:
22+
23+buildPythonApplication rec {
24+ pname = "bikeshed";
25+ version = "3.4.3";
26+
27+ src = fetchPypi {
28+ inherit pname version;
29+ sha256 = "sha256-vJW4yNbKCZraJ5vx8FheNsBl+zObGoLFgAVqoU0p9QQ=";
30+ };
31+
32+ # Relax requirements from "==" to ">="
33+ # https://github.com/tabatkins/bikeshed/issues/2178
34+ postPatch = ''
35+ substituteInPlace requirements.txt \
36+ --replace "==" ">="
37+ '';
38+
39+ propagatedBuildInputs = [
40+ aiofiles
41+ aiohttp
42+ attrs
43+ certifi
44+ cssselect
45+ html5lib
46+ isodate
47+ json-home-client
48+ lxml
49+ pillow
50+ pygments
51+ requests
52+ result
53+ setuptools
54+ tenacity
55+ widlparser
56+ ];
57+
58+ checkPhase = ''
59+ $out/bin/bikeshed test
60+ '';
61+
62+ pythonImportsCheck = [ "bikeshed" ];
63+
64+ meta = with lib; {
65+ description = "Preprocessor for anyone writing specifications that converts source files into actual specs";
66+ longDescription = ''
67+ Bikeshed is a pre-processor for spec documents, turning a source document
68+ (containing only the actual spec content, plus several shorthands for linking
69+ to terms and other things) into a final spec document, with appropriate boilerplate,
70+ bibliography, indexes, etc all filled in. It's used on specs for CSS
71+ and many other W3C working groups, WHATWG, the C++ standards committee, and elsewhere!
72+ '';
73+ homepage = "https://tabatkins.github.io/bikeshed/";
74+ license = licenses.cc0;
75+ maintainers = [ maintainers.kvark ];
76+ };
77+}