nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 betamax-matchers,
4 betamax-serializers,
5 betamax,
6 buildPythonPackage,
7 fetchFromGitHub,
8 flit-core,
9 mock,
10 prawcore,
11 pytestCheckHook,
12 requests-toolbelt,
13 update-checker,
14 websocket-client,
15}:
16
17buildPythonPackage rec {
18 pname = "praw";
19 version = "7.8.1";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "praw-dev";
24 repo = "praw";
25 tag = "v${version}";
26 hash = "sha256-jxF7rlMwKIKwyYv35vYWAdtClsVhnIkywoyMQeggGBc=";
27 };
28
29 build-system = [ flit-core ];
30
31 dependencies = [
32 mock
33 prawcore
34 update-checker
35 websocket-client
36 ];
37
38 nativeCheckInputs = [
39 betamax
40 betamax-serializers
41 betamax-matchers
42 pytestCheckHook
43 requests-toolbelt
44 ];
45
46 disabledTestPaths = [
47 # tests requiring network
48 "tests/integration"
49 ];
50
51 pythonImportsCheck = [ "praw" ];
52
53 meta = {
54 description = "Python Reddit API wrapper";
55 homepage = "https://praw.readthedocs.org/";
56 changelog = "https://github.com/praw-dev/praw/blob/v${version}/CHANGES.rst";
57 license = lib.licenses.bsd2;
58 maintainers = with lib.maintainers; [ fab ];
59 };
60}