14 buildPythonPackage rec {
15 pname = "mysql-connector";
17 format = "setuptools";
19 disabled = pythonOlder "3.7";
22 "--with-mysql-capi=\"${mysql80}\""
23 "--with-openssl-include-dir=\"${openssl.dev}/include\""
24 "--with-openssl-lib-dir=\"${lib.getLib openssl}/lib\""
25 "-L \"${lib.getLib pkgs.zstd}/lib:${lib.getLib mysql80}/lib\""
28 src = fetchFromGitHub {
30 repo = "mysql-connector-python";
32 hash = "sha256-GtMq7E2qBqFu54hjUotzPyxScTKXNdEQcmgHnS7lBhc=";
36 # mysql-connector overrides MACOSX_DEPLOYMENT_TARGET to 11.
37 # This makes the installation with nixpkgs fail. I suspect, that's
38 # because stdenv.hostPlatform.darwinSdkVersion is (currently) set to
39 # 10.12. The patch reverts
40 # https://github.com/mysql/mysql-connector-python/commit/d1e89fd3d7391084cdf35b0806cb5d2a4b413654
41 ./0001-Revert-Fix-MacOS-wheels-platform-tag.patch
49 propagatedBuildInputs = [
57 pythonImportsCheck = [
61 # Tests require a running MySQL instance
65 description = "A MySQL driver";
67 A MySQL driver that does not depend on MySQL C client libraries and
68 implements the DB API v2.0 specification.
70 homepage = "https://github.com/mysql/mysql-connector-python";
71 changelog = "https://raw.githubusercontent.com/mysql/mysql-connector-python/${version}/CHANGES.txt";
72 license = licenses.gpl2Only;
73 maintainers = with maintainers; [ neosimsim turion ];