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