From 8858cc18210b8eb11fde17d0edfcf4ab9c44a3b8 Mon Sep 17 00:00:00 2001 From: Bruno Bigras Date: Wed, 15 Jan 2020 00:07:23 -0500 Subject: [PATCH] httpie: 1.0.3 -> 2.0.0 --- pkgs/tools/networking/httpie/default.nix | 10 +++------- pkgs/tools/networking/httpie/strip-venv.patch | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 pkgs/tools/networking/httpie/strip-venv.patch diff --git a/pkgs/tools/networking/httpie/default.nix b/pkgs/tools/networking/httpie/default.nix index 4230762d946..38fdab358c9 100644 --- a/pkgs/tools/networking/httpie/default.nix +++ b/pkgs/tools/networking/httpie/default.nix @@ -2,22 +2,18 @@ python3Packages.buildPythonApplication rec { pname = "httpie"; - version = "1.0.3"; + version = "2.0.0"; src = fetchFromGitHub { owner = "jakubroztocil"; repo = "httpie"; rev = version; - sha256 = "0y30sp0x3nmgzi4dqw1rc3705hnn36ij0zlyyx7g6fqdq8bd8p5q"; + sha256 = "0d0rsn5i973l9y0ws3xmnzaw4jwxdlryyjbasnlddph5mvkf7dq0"; }; propagatedBuildInputs = with python3Packages; [ pygments requests setuptools ]; dontUseSetuptoolsCheck = true; - - disabledTests = [ - "test_current_version" - "test_error" - ]; + patches = [ ./strip-venv.patch ]; checkInputs = with python3Packages; [ mock diff --git a/pkgs/tools/networking/httpie/strip-venv.patch b/pkgs/tools/networking/httpie/strip-venv.patch new file mode 100644 index 00000000000..99ea80a3f56 --- /dev/null +++ b/pkgs/tools/networking/httpie/strip-venv.patch @@ -0,0 +1,19 @@ +diff --git a/tests/test_docs.py b/tests/test_docs.py +index 7a41822..720ecf6 100644 +--- a/tests/test_docs.py ++++ b/tests/test_docs.py +@@ -41,12 +41,10 @@ assert filenames + + # HACK: hardcoded paths, venv should be irrelevant, etc. + # TODO: replaces the process with Python code +-VENV_BIN = Path(__file__).parent.parent / 'venv/bin' +-VENV_PYTHON = VENV_BIN / 'python' +-VENV_RST2PSEUDOXML = VENV_BIN / 'rst2pseudoxml.py' ++VENV_PYTHON = 'python' ++VENV_RST2PSEUDOXML = 'rst2pseudoxml.py' + + +-@pytest.mark.skipif(not os.path.exists(VENV_RST2PSEUDOXML), reason='docutils not installed') + @pytest.mark.parametrize('filename', filenames) + def test_rst_file_syntax(filename): + p = subprocess.Popen(