tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
httpie: 2.2.0 -> 2.4.0
Sandro Jäckel
5 years ago
a56bc4a9
cb52887c
+23
-32
2 changed files
expand all
collapse all
unified
split
pkgs
tools
networking
httpie
default.nix
strip-venv.patch
+15
-27
pkgs/tools/networking/httpie/default.nix
···
1
1
-
{ lib, fetchFromGitHub, python3Packages, docutils, fetchpatch }:
1
1
+
{ lib, fetchFromGitHub, python3Packages, docutils }:
2
2
3
3
python3Packages.buildPythonApplication rec {
4
4
pname = "httpie";
5
5
-
version = "2.2.0";
5
5
+
version = "2.4.0";
6
6
7
7
src = fetchFromGitHub {
8
8
-
owner = "jakubroztocil";
8
8
+
owner = "httpie";
9
9
repo = "httpie";
10
10
rev = version;
11
11
-
sha256 = "0caazv24jr0844c4mdx77vzwwi5m869n10wa42cydb08ppx1xxj6";
11
11
+
sha256 = "00lafjqg9nfnak0nhcr2l2hzzkwn2y6qv0wdkm6r6f69snizy3hf";
12
12
};
13
13
14
14
-
outputs = [ "out" "doc" "man" ];
15
15
-
16
16
-
propagatedBuildInputs = with python3Packages; [ pygments requests setuptools ];
17
17
-
dontUseSetuptoolsCheck = true;
18
14
patches = [
19
15
./strip-venv.patch
20
20
-
21
21
-
# Fix `test_ciphers_none_can_be_selected`
22
22
-
# TODO: remove on next release
23
23
-
(fetchpatch {
24
24
-
url = "https://github.com/jakubroztocil/httpie/commit/49e71d252f54871a6bc49cb1cba103d385a543b8.patch";
25
25
-
sha256 = "13b2faf50gimj7f17dlx4gmd8ph8ipgihpzfqbvmfjlbf1v95fsj";
26
26
-
})
27
16
];
28
17
18
18
+
outputs = [ "out" "doc" "man" ];
19
19
+
20
20
+
propagatedBuildInputs = with python3Packages; [ pygments requests requests-toolbelt setuptools ];
21
21
+
29
22
checkInputs = with python3Packages; [
30
23
mock
31
24
pytest
···
70
63
toHtml CHANGELOG.rst $docdir/html/CHANGELOG.html
71
64
toHtml CONTRIBUTING.rst $docdir/html/CONTRIBUTING.html
72
65
73
73
-
# change a few links to the local files
74
74
-
substituteInPlace $docdir/html/index.html \
75
75
-
--replace \
76
76
-
'https://github.com/jakubroztocil/httpie/blob/master/CHANGELOG.rst' \
77
77
-
"CHANGELOG.html" \
78
78
-
--replace \
79
79
-
'https://github.com/jakubroztocil/httpie/blob/master/CONTRIBUTING.rst' \
80
80
-
"CONTRIBUTING.html"
81
81
-
82
66
${docutils}/bin/rst2man \
83
67
--strip-elements-with-class=no-web \
84
68
--title=http \
···
94
78
export PATH=${docutils}/bin:$PATH
95
79
'';
96
80
97
97
-
meta = {
81
81
+
checkPhase = ''
82
82
+
py.test ./httpie ./tests --doctest-modules --verbose ./httpie ./tests -k 'not test_chunked and not test_verbose_chunked and not test_multipart_chunked and not test_request_body_from_file_by_path_chunked'
83
83
+
'';
84
84
+
85
85
+
meta = with lib; {
98
86
description = "A command line HTTP client whose goal is to make CLI human-friendly";
99
87
homepage = "https://httpie.org/";
100
100
-
license = lib.licenses.bsd3;
101
101
-
maintainers = with lib.maintainers; [ antono relrod schneefux ];
88
88
+
license = licenses.bsd3;
89
89
+
maintainers = with maintainers; [ antono relrod schneefux SuperSandro2000 ];
102
90
};
103
91
}
+8
-5
pkgs/tools/networking/httpie/strip-venv.patch
···
1
1
diff --git a/tests/test_docs.py b/tests/test_docs.py
2
2
-
index 7a41822..720ecf6 100644
2
2
+
index 340e64d..a6b4dc9 100644
3
3
--- a/tests/test_docs.py
4
4
+++ b/tests/test_docs.py
5
5
-
@@ -41,12 +41,10 @@ assert filenames
6
6
-
5
5
+
@@ -42,15 +42,10 @@ assert filenames
7
6
# HACK: hardcoded paths, venv should be irrelevant, etc.
8
8
-
# TODO: replaces the process with Python code
7
7
+
# TODO: simplify by using the Python API instead of a subprocess
8
8
+
# then we wont’t need the paths.
9
9
-VENV_BIN = Path(__file__).parent.parent / 'venv/bin'
10
10
-VENV_PYTHON = VENV_BIN / 'python'
11
11
-VENV_RST2PSEUDOXML = VENV_BIN / 'rst2pseudoxml.py'
···
13
13
+VENV_RST2PSEUDOXML = 'rst2pseudoxml.py'
14
14
15
15
16
16
-
-@pytest.mark.skipif(not os.path.exists(VENV_RST2PSEUDOXML), reason='docutils not installed')
16
16
+
-@pytest.mark.skipif(
17
17
+
- not VENV_RST2PSEUDOXML.exists(),
18
18
+
- reason='docutils not installed',
19
19
+
-)
17
20
@pytest.mark.parametrize('filename', filenames)
18
21
def test_rst_file_syntax(filename):
19
22
p = subprocess.Popen(