1{ lib, buildPythonPackage, fetchFromGitHub, python, protobuf3_6 }:
2
3let
4 py = python.override {
5 packageOverrides = self: super: {
6 protobuf = super.protobuf.override {
7 protobuf = protobuf3_6;
8 };
9 };
10 };
11in buildPythonPackage rec {
12 pname = "mysql-connector";
13 version = "8.0.19";
14
15 src = fetchFromGitHub {
16 owner = "mysql";
17 repo = "mysql-connector-python";
18 rev = version;
19 sha256 = "1jscmc5s7mwx43gvxjlqc30ylp5jjpmkqx7s3b9nllbh926p3ixg";
20 };
21
22 propagatedBuildInputs = with py.pkgs; [ protobuf dnspython ];
23
24 # Tests are failing (TODO: unknown reason)
25 # TypeError: __init__() missing 1 required positional argument: 'string'
26 # But the library should be working as expected.
27 doCheck = false;
28
29 meta = {
30 description = "A MySQL driver";
31 longDescription = ''
32 A MySQL driver that does not depend on MySQL C client libraries and
33 implements the DB API v2.0 specification.
34 '';
35 homepage = https://github.com/mysql/mysql-connector-python;
36 license = [ lib.licenses.gpl2 ];
37 maintainers = with lib.maintainers; [ primeos ];
38 };
39}