|
|
@ -1,16 +1,24 @@ |
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, python }: |
|
|
|
{ lib |
|
|
|
|
|
|
|
, buildPythonPackage |
|
|
|
|
|
|
|
, django |
|
|
|
|
|
|
|
, dnspython |
|
|
|
|
|
|
|
, fetchFromGitHub |
|
|
|
|
|
|
|
, protobuf |
|
|
|
|
|
|
|
, pythonOlder |
|
|
|
|
|
|
|
}: |
|
|
|
|
|
|
|
|
|
|
|
let |
|
|
|
buildPythonPackage rec { |
|
|
|
py = python; |
|
|
|
|
|
|
|
in buildPythonPackage rec { |
|
|
|
|
|
|
|
pname = "mysql-connector"; |
|
|
|
pname = "mysql-connector"; |
|
|
|
version = "8.0.24"; |
|
|
|
version = "8.0.29"; |
|
|
|
|
|
|
|
format = "setuptools"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7"; |
|
|
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub { |
|
|
|
src = fetchFromGitHub { |
|
|
|
owner = "mysql"; |
|
|
|
owner = "mysql"; |
|
|
|
repo = "mysql-connector-python"; |
|
|
|
repo = "mysql-connector-python"; |
|
|
|
rev = version; |
|
|
|
rev = version; |
|
|
|
sha256 = "1zb5wf65rnpbk0lw31i4piy0bq09hqa62gx7bh241zc5310zccc7"; |
|
|
|
hash = "sha256-X0qiXNYkNoR00ESUdByPj4dPnEnjLyopm25lm1JvkAk="; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
patches = [ |
|
|
|
patches = [ |
|
|
@ -22,16 +30,19 @@ in buildPythonPackage rec { |
|
|
|
./0001-Revert-Fix-MacOS-wheels-platform-tag.patch |
|
|
|
./0001-Revert-Fix-MacOS-wheels-platform-tag.patch |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
propagatedBuildInputs = with py.pkgs; [ protobuf dnspython ]; |
|
|
|
propagatedBuildInputs = [ |
|
|
|
|
|
|
|
dnspython |
|
|
|
|
|
|
|
protobuf |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
# Tests are failing (TODO: unknown reason) |
|
|
|
pythonImportsCheck = [ |
|
|
|
# TypeError: __init__() missing 1 required positional argument: 'string' |
|
|
|
"mysql" |
|
|
|
# But the library should be working as expected. |
|
|
|
]; |
|
|
|
doCheck = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "mysql" ]; |
|
|
|
# Tests require a running MySQL instance |
|
|
|
|
|
|
|
doCheck = false; |
|
|
|
|
|
|
|
|
|
|
|
meta = { |
|
|
|
meta = with lib; { |
|
|
|
description = "A MySQL driver"; |
|
|
|
description = "A MySQL driver"; |
|
|
|
longDescription = '' |
|
|
|
longDescription = '' |
|
|
|
A MySQL driver that does not depend on MySQL C client libraries and |
|
|
|
A MySQL driver that does not depend on MySQL C client libraries and |
|
|
@ -39,7 +50,7 @@ in buildPythonPackage rec { |
|
|
|
''; |
|
|
|
''; |
|
|
|
homepage = "https://github.com/mysql/mysql-connector-python"; |
|
|
|
homepage = "https://github.com/mysql/mysql-connector-python"; |
|
|
|
changelog = "https://raw.githubusercontent.com/mysql/mysql-connector-python/${version}/CHANGES.txt"; |
|
|
|
changelog = "https://raw.githubusercontent.com/mysql/mysql-connector-python/${version}/CHANGES.txt"; |
|
|
|
license = [ lib.licenses.gpl2Only ]; |
|
|
|
license = licenses.gpl2Only; |
|
|
|
maintainers = with lib.maintainers; [ neosimsim turion ]; |
|
|
|
maintainers = with maintainers; [ neosimsim turion ]; |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|