1{
2 lib,
3 buildPythonPackage,
4 pythonAtLeast,
5 fetchFromGitHub,
6
7 # propagates
8 pyyaml,
9
10 # optionals
11 boto3,
12 botocore,
13 google-cloud-dataproc,
14 google-cloud-logging,
15 google-cloud-storage,
16 python-rapidjson,
17 simplejson,
18 ujson,
19
20 # tests
21 pyspark,
22 unittestCheckHook,
23 warcio,
24}:
25
26buildPythonPackage rec {
27 pname = "mrjob";
28 version = "0.7.4";
29
30 # https://github.com/Yelp/mrjob/issues/2222
31 disabled = pythonAtLeast "3.12";
32
33 src = fetchFromGitHub {
34 owner = "Yelp";
35 repo = "mrjob";
36 rev = "refs/tags/v${version}";
37 hash = "sha256-Yp4yUx6tkyGB622I9y+AWK2AkIDVGKQPMM+LtB/M3uo=";
38 };
39
40 propagatedBuildInputs = [ pyyaml ];
41
42 passthru.optional-dependencies = {
43 aws = [
44 boto3
45 botocore
46 ];
47 google = [
48 google-cloud-dataproc
49 google-cloud-logging
50 google-cloud-storage
51 ];
52 rapidjson = [ python-rapidjson ];
53 simplejson = [ simplejson ];
54 ujson = [ ujson ];
55 };
56
57 doCheck = false; # failing tests
58
59 nativeCheckInputs = [
60 pyspark
61 unittestCheckHook
62 warcio
63 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
64
65 unittestFlagsArray = [ "-v" ];
66
67 meta = with lib; {
68 changelog = "https://github.com/Yelp/mrjob/blob/v${version}/CHANGES.txt";
69 description = "Run MapReduce jobs on Hadoop or Amazon Web Services";
70 homepage = "https://github.com/Yelp/mrjob";
71 license = licenses.asl20;
72 maintainers = with maintainers; [ ];
73 };
74}