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