diff --git a/pkgs/development/python-modules/requests-mock/default.nix b/pkgs/development/python-modules/requests-mock/default.nix new file mode 100644 index 000000000000..ef87c4f10195 --- /dev/null +++ b/pkgs/development/python-modules/requests-mock/default.nix @@ -0,0 +1,21 @@ +{ lib, buildPythonPackage, fetchPypi, python +, mock, testrepository, testtools +, requests, six }: + +buildPythonPackage rec { + pname = "requests-mock"; + version = "1.4.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "2931887853c42e1d73879983d5bf03041109472991c5b4b8dba5d11ed23b9d0b"; + }; + + patchPhase = '' + sed -i 's@python@${python.interpreter}@' .testr.conf + ''; + + checkInputs = [ mock testrepository testtools ]; + + propagatedBuildInputs = [ requests six ]; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1fde0b383d73..bd24d8a185da 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9567,22 +9567,7 @@ in { olefile = callPackage ../development/python-modules/olefile { }; - requests-mock = buildPythonPackage rec { - name = "requests-mock-${version}"; - version = "1.3.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/r/requests-mock/${name}.tar.gz"; - sha256 = "0jr997dvk6zbmhvbpcv3rajrgag69mcsm1ai3w3rgk2jdh6rg1mx"; - }; - - patchPhase = '' - sed -i 's@python@${python.interpreter}@' .testr.conf - ''; - - buildInputs = with self; [ pbr testtools testrepository mock ]; - propagatedBuildInputs = with self; [ six requests ]; - }; + requests-mock = callPackage ../development/python-modules/requests-mock { }; mox3 = buildPythonPackage rec { name = "mox3-${version}";