about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2019-09-23 18:07:28 +0200
committerGitHub <noreply@github.com>2019-09-23 18:07:28 +0200
commitbc2b3ea358de23ea09b6becf59c6e72b5880bc2a (patch)
tree5872231b39ed65ca0069eef7b9bec9ef8e27eab8 /pkgs
parentd70eba7ab354778ec292e06799fef2c8982e8952 (diff)
parent8e255982d41108b3da6e09674f7bfcdcf5c6e611 (diff)
downloadnixlib-bc2b3ea358de23ea09b6becf59c6e72b5880bc2a.tar
nixlib-bc2b3ea358de23ea09b6becf59c6e72b5880bc2a.tar.gz
nixlib-bc2b3ea358de23ea09b6becf59c6e72b5880bc2a.tar.bz2
nixlib-bc2b3ea358de23ea09b6becf59c6e72b5880bc2a.tar.lz
nixlib-bc2b3ea358de23ea09b6becf59c6e72b5880bc2a.tar.xz
nixlib-bc2b3ea358de23ea09b6becf59c6e72b5880bc2a.tar.zst
nixlib-bc2b3ea358de23ea09b6becf59c6e72b5880bc2a.zip
Merge pull request #69303 from flokli/httpie-tests
httpie: run tests
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/networking/httpie/default.nix28
1 files changed, 23 insertions, 5 deletions
diff --git a/pkgs/tools/networking/httpie/default.nix b/pkgs/tools/networking/httpie/default.nix
index cf3c173e1b22..4230762d9466 100644
--- a/pkgs/tools/networking/httpie/default.nix
+++ b/pkgs/tools/networking/httpie/default.nix
@@ -1,17 +1,35 @@
-{ stdenv, fetchurl, python3Packages }:
+{ stdenv, fetchFromGitHub, python3Packages, docutils, }:
 
 python3Packages.buildPythonApplication rec {
   pname = "httpie";
   version = "1.0.3";
 
-  src = python3Packages.fetchPypi {
-    inherit pname version;
-    sha256 = "103fcigpxf4nqmrdqjnyz7d9n4n16906slwmmqqc0gkxv8hnw6vd";
+  src = fetchFromGitHub {
+    owner = "jakubroztocil";
+    repo = "httpie";
+    rev = version;
+    sha256 = "0y30sp0x3nmgzi4dqw1rc3705hnn36ij0zlyyx7g6fqdq8bd8p5q";
   };
 
   propagatedBuildInputs = with python3Packages; [ pygments requests setuptools ];
+  dontUseSetuptoolsCheck = true;
 
-  doCheck = false;
+  disabledTests = [
+    "test_current_version"
+    "test_error"
+  ];
+
+  checkInputs = with python3Packages; [
+    mock
+    pytest
+    pytest-httpbin
+    pytestCheckHook
+  ];
+
+  # the tests call rst2pseudoxml.py from docutils
+  preCheck = ''
+    export PATH=${docutils}/bin:$PATH
+  '';
 
   meta = {
     description = "A command line HTTP client whose goal is to make CLI human-friendly";