diff --git a/pkgs/development/python-modules/praw/default.nix b/pkgs/development/python-modules/praw/default.nix new file mode 100644 index 000000000000..c0be1009b069 --- /dev/null +++ b/pkgs/development/python-modules/praw/default.nix @@ -0,0 +1,43 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub +, requests, decorator, flake8, mock, six, update_checker, pytestrunner, prawcore +, pytest, betamax, betamax-serializers, betamax-matchers, requests_toolbelt +}: + +buildPythonPackage rec { + pname = "praw"; + version = "5.2.0"; + + src = fetchFromGitHub { + owner = "praw-dev"; + repo = "praw"; + rev = "v${version}"; + sha256 = "0nwfadczxa1fyq65zc3sfv8g2r4w3xrx3bdi5fv9xpn97wh2ifgw"; + }; + + propagatedBuildInputs = [ + requests + decorator + flake8 + mock + six + update_checker + pytestrunner + prawcore + ]; + + checkInputs = [ + pytest + betamax + betamax-serializers + betamax-matchers + requests_toolbelt + ]; + + meta = with stdenv.lib; { + description = "Python Reddit API wrapper"; + homepage = http://praw.readthedocs.org/; + license = licenses.gpl3; + platforms = platforms.all; + maintainers = with maintainers; [ jgeerds ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dbfb52b1fadf..727a2b25adba 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15066,34 +15066,7 @@ in { }; }; - praw = buildPythonPackage rec { - name = "praw-3.5.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/praw/${name}.zip"; - sha256 = "1hwdzqbrjdkicqhyxpcpsmld21k0ndpy8d2gk6l5mv9isw3dm8qa"; - }; - - propagatedBuildInputs = with self; [ - requests - decorator - flake8 - mock - six - update_checker - ]; - - # can't find the tests module? - doCheck = false; - - meta = { - description = "Python Reddit API wrapper"; - homepage = http://praw.readthedocs.org/; - license = licenses.gpl3; - platforms = platforms.all; - maintainers = with maintainers; [ jgeerds ]; - }; - }; + praw = callPackage ../development/python-modules/praw { }; prawcore = callPackage ../development/python-modules/prawcore { };