1{ lib, buildPythonPackage, fetchFromGitHub, python }: 2 3let 4 py = python; 5in buildPythonPackage rec { 6 pname = "mysql-connector"; 7 version = "8.0.24"; 8 9 src = fetchFromGitHub { 10 owner = "mysql"; 11 repo = "mysql-connector-python"; 12 rev = version; 13 sha256 = "1zb5wf65rnpbk0lw31i4piy0bq09hqa62gx7bh241zc5310zccc7"; 14 }; 15 16 patches = [ 17 # mysql-connector overrides MACOSX_DEPLOYMENT_TARGET to 11. 18 # This makes the installation with nixpkgs fail. I suspect, that's 19 # because stdenv.targetPlatform.darwinSdkVersion is (currently) set to 20 # 10.12. The patch reverts 21 # https://github.com/mysql/mysql-connector-python/commit/d1e89fd3d7391084cdf35b0806cb5d2a4b413654 22 ./0001-Revert-Fix-MacOS-wheels-platform-tag.patch 23 ]; 24 25 propagatedBuildInputs = with py.pkgs; [ protobuf dnspython ]; 26 27 # Tests are failing (TODO: unknown reason) 28 # TypeError: __init__() missing 1 required positional argument: 'string' 29 # But the library should be working as expected. 30 doCheck = false; 31 32 pythonImportsCheck = [ "mysql" ]; 33 34 meta = { 35 description = "A MySQL driver"; 36 longDescription = '' 37 A MySQL driver that does not depend on MySQL C client libraries and 38 implements the DB API v2.0 specification. 39 ''; 40 homepage = "https://github.com/mysql/mysql-connector-python"; 41 changelog = "https://raw.githubusercontent.com/mysql/mysql-connector-python/${version}/CHANGES.txt"; 42 license = [ lib.licenses.gpl2Only ]; 43 maintainers = with lib.maintainers; [ neosimsim turion ]; 44 }; 45}