diff --git a/pkgs/development/python-modules/betamax/default.nix b/pkgs/development/python-modules/betamax/default.nix new file mode 100644 index 000000000000..8051ed0beff5 --- /dev/null +++ b/pkgs/development/python-modules/betamax/default.nix @@ -0,0 +1,22 @@ +{ stdenv, buildPythonPackage, fetchPypi, requests }: + +buildPythonPackage rec { + pname = "betamax"; + version = "0.8.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"; + }; + + propagatedBuildInputs = [ requests ]; + + doCheck = false; + + meta = with stdenv.lib; { + homepage = https://betamax.readthedocs.org/en/latest/; + description = "A VCR imitation for requests"; + license = licenses.asl20; + maintainers = with maintainers; [ pSub ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3c283a02ddb5..7aa4c28d6da6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -959,25 +959,7 @@ in { }; }; - betamax = buildPythonPackage rec { - name = "betamax-0.8.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/b/betamax/${name}.tar.gz"; - sha256 = "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"; - }; - - propagatedBuildInputs = [ self.requests ]; - - doCheck = false; - - meta = with stdenv.lib; { - homepage = https://betamax.readthedocs.org/en/latest/; - description = "A VCR imitation for requests"; - license = licenses.asl20; - maintainers = with maintainers; [ pSub ]; - }; - }; + betamax = callPackage ../development/python-modules/betamax {}; betamax-matchers = callPackage ../development/python-modules/betamax-matchers { };