12 buildPythonPackage rec {
13 pname = "mysql-connector";
15 format = "setuptools";
17 disabled = pythonOlder "3.7";
19 src = fetchFromGitHub {
21 repo = "mysql-connector-python";
23 hash = "sha256-X0qiXNYkNoR00ESUdByPj4dPnEnjLyopm25lm1JvkAk=";
27 # mysql-connector overrides MACOSX_DEPLOYMENT_TARGET to 11.
28 # This makes the installation with nixpkgs fail. I suspect, that's
29 # because stdenv.targetPlatform.darwinSdkVersion is (currently) set to
30 # 10.12. The patch reverts
31 # https://github.com/mysql/mysql-connector-python/commit/d1e89fd3d7391084cdf35b0806cb5d2a4b413654
32 ./0001-Revert-Fix-MacOS-wheels-platform-tag.patch
34 # Allow for clang to be used to build native extensions
36 url = "https://github.com/mysql/mysql-connector-python/commit/fd24ce9dc8c60cc446a8e69458f7851d047c7831.patch";
37 sha256 = "sha256-WvU1iB53MavCsksKCjGvUl7R3Ww/38alxxMVzjpr5Xg=";
41 propagatedBuildInputs = [
46 pythonImportsCheck = [
50 # Tests require a running MySQL instance
54 description = "A MySQL driver";
56 A MySQL driver that does not depend on MySQL C client libraries and
57 implements the DB API v2.0 specification.
59 homepage = "https://github.com/mysql/mysql-connector-python";
60 changelog = "https://raw.githubusercontent.com/mysql/mysql-connector-python/${version}/CHANGES.txt";
61 license = licenses.gpl2Only;
62 maintainers = with maintainers; [ neosimsim turion ];