git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #147036 from kvark/bikeshed

bikeshed: init at 3.3.2 & its dependencies

commit55e580b86dd4402fbc2a6793bba6dcf40c56652c authorSilvan Mosberger <contact@infinisil.com> dateThu 7 Apr 2022, 22:16 (5 years ago) parentab80b78e54be9a
7 files changed+240
pkgs/applications/misc/bikeshed/default.nix+77 pkgs/development/python-modules/json-home-client/default.nix+40 pkgs/development/python-modules/result/default.nix+45 pkgs/development/python-modules/uri-template/default.nix+30 pkgs/development/python-modules/widlparser/default.nix+38 pkgs/top-level/all-packages.nix+2 pkgs/top-level/python-packages.nix+8
pkgs/applications/misc/bikeshed/default.nixnew file+77
@@ -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+}
pkgs/development/python-modules/json-home-client/default.nixnew file+40
@@ -0,0 +1,40 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pythonOlder
5+# build inputs
6+, typing-extensions
7+, uri-template
8+}:
9+
10+buildPythonPackage rec {
11+ pname = "json-home-client";
12+ version = "1.1.1";
13+
14+ disabled = pythonOlder "3.6";
15+
16+ src = fetchFromGitHub {
17+ owner = "plinss";
18+ repo = "json_home_client";
19+ rev = "v${version}";
20+ sha256 = "sha256-DhnvvY1nMe1sdRE+OgjBt4TsLmiqnD8If4rl700zW9E=";
21+ };
22+
23+ postPatch = ''
24+ sed -i -e 's/0.0.0/${version}/' setup.py
25+ '';
26+
27+ propagatedBuildInputs = [
28+ typing-extensions
29+ uri-template
30+ ];
31+
32+ pythonImportsCheck = [ "json_home_client" ];
33+
34+ meta = with lib; {
35+ description = "Client class for calling http+json APIs in Python";
36+ homepage = "https://github.com/plinss/json_home_client";
37+ license = licenses.mit;
38+ maintainers = [ maintainers.kvark ];
39+ };
40+}
pkgs/development/python-modules/result/default.nixnew file+45
@@ -0,0 +1,45 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pytestCheckHook
5+}:
6+
7+buildPythonPackage rec {
8+ pname = "result";
9+ version = "0.7.0";
10+
11+ src = fetchFromGitHub {
12+ owner = "rustedpy";
13+ repo = "result";
14+ rev = "v${version}";
15+ sha256 = "sha256-bEf3OJg6ksDvzZE7ezA58Q2FObb5V7BG8vkKtX284Jg=";
16+ };
17+
18+ postPatch = ''
19+ substituteInPlace pyproject.toml \
20+ --replace '"--flake8",' "" \
21+ --replace '"--tb=short",' "" \
22+ --replace '"--cov=result",' "" \
23+ --replace '"--cov=tests",' "" \
24+ --replace '"--cov-report=term",' "" \
25+ --replace '"--cov-report=xml",' ""
26+ '';
27+
28+ checkInputs = [
29+ pytestCheckHook
30+ ];
31+
32+ disabledTestPaths = [
33+ #TODO: figure out the failure "match o:" Invalid Syntax
34+ "tests/test_pattern_matching.py"
35+ ];
36+
37+ pythonImportsCheck = [ "result" ];
38+
39+ meta = with lib; {
40+ description = "A simple Result type for Python 3 inspired by Rust, fully type annotated";
41+ homepage = "https://github.com/rustedpy/result";
42+ license = licenses.mit;
43+ maintainers = [ maintainers.kvark ];
44+ };
45+}
pkgs/development/python-modules/uri-template/default.nixnew file+30
@@ -0,0 +1,30 @@
1+{ lib, buildPythonPackage, fetchFromGitHub, python }:
2+
3+buildPythonPackage rec {
4+ pname = "uri-template";
5+ version = "1.2.0";
6+
7+ src = fetchFromGitHub {
8+ owner = "plinss";
9+ repo = "uri_template";
10+ rev = "v${version}";
11+ sha256 = "sha256-IAq6GpEwimq45FU0QugLZLSOhwAmC1KbpZKD0zyxsUs=";
12+ };
13+
14+ postPatch = ''
15+ sed -i -e 's/0.0.0/${version}/' setup.py
16+ '';
17+
18+ checkPhase = ''
19+ ${python.interpreter} test.py
20+ '';
21+
22+ pythonImportsCheck = [ "uri_template" ];
23+
24+ meta = with lib; {
25+ description = "An implementation of RFC 6570 URI Templates";
26+ homepage = "https://github.com/plinss/uri_template/";
27+ license = licenses.mit;
28+ maintainers = [ maintainers.kvark ];
29+ };
30+}
pkgs/development/python-modules/widlparser/default.nixnew file+38
@@ -0,0 +1,38 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pythonOlder
5+# build inputs
6+, typing-extensions
7+}:
8+
9+buildPythonPackage rec {
10+ pname = "widlparser";
11+ version = "1.0.12";
12+
13+ disabled = pythonOlder "3.7";
14+
15+ src = fetchFromGitHub {
16+ owner = "plinss";
17+ repo = pname;
18+ rev = "v${version}";
19+ sha256 = "sha256-T17fDWYd1naza/ao7kXWGcRIl2fzL1/Z9SaJiutZzqk=";
20+ };
21+
22+ postPatch = ''
23+ sed -i -e 's/0.0.0/${version}/' setup.py
24+ '';
25+
26+ propagatedBuildInputs = [
27+ typing-extensions
28+ ];
29+
30+ pythonImportsCheck = [ "widlparser" ];
31+
32+ meta = with lib; {
33+ description = "Stand-alone WebIDL Parser in Python";
34+ homepage = "https://github.com/plinss/widlparser";
35+ license = licenses.mit;
36+ maintainers = [ maintainers.kvark ];
37+ };
38+}
pkgs/top-level/all-packages.nix+2
@@ -1071,6 +1071,8 @@ with pkgs;
10711071
10721072 cf-vault = callPackage ../tools/admin/cf-vault { };
10731073
1074+ bikeshed = python3Packages.callPackage ../applications/misc/bikeshed { };
1075+
10741076 cope = callPackage ../tools/misc/cope { };
10751077
10761078 ejson2env = callPackage ../tools/admin/ejson2env { };
pkgs/top-level/python-packages.nix+8
@@ -4335,6 +4335,8 @@ in {
43354335
43364336 jsonmerge = callPackage ../development/python-modules/jsonmerge { };
43374337
4338+ json-home-client = callPackage ../development/python-modules/json-home-client { };
4339+
43384340 json-merge-patch = callPackage ../development/python-modules/json-merge-patch { };
43394341
43404342 json-schema-for-humans = callPackage ../development/python-modules/json-schema-for-humans { };
@@ -8821,6 +8823,8 @@ in {
88218823
88228824 restview = callPackage ../development/python-modules/restview { };
88238825
8826+ result = callPackage ../development/python-modules/result { };
8827+
88248828 rethinkdb = callPackage ../development/python-modules/rethinkdb { };
88258829
88268830 retry = callPackage ../development/python-modules/retry { };
@@ -10459,6 +10463,8 @@ in {
1045910463
1046010464 uritemplate = callPackage ../development/python-modules/uritemplate { };
1046110465
10466+ uri-template = callPackage ../development/python-modules/uri-template { };
10467+
1046210468 uritools = callPackage ../development/python-modules/uritools { };
1046310469
1046410470 url-normalize = callPackage ../development/python-modules/url-normalize { };
@@ -10749,6 +10755,8 @@ in {
1074910755
1075010756 widgetsnbextension = callPackage ../development/python-modules/widgetsnbextension { };
1075110757
10758+ widlparser = callPackage ../development/python-modules/widlparser { };
10759+
1075210760 wiffi = callPackage ../development/python-modules/wiffi { };
1075310761
1075410762 willow = callPackage ../development/python-modules/willow { };