ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / mysql-connector / default.nix
bloba8d25b0be18667a65630a59a86e01124a138531e
1 { stdenv
2 , lib
3 , buildPythonPackage
4 , django
5 , dnspython
6 , fetchFromGitHub
7 , protobuf
8 , pythonOlder
9 , fetchpatch
12 buildPythonPackage rec {
13   pname = "mysql-connector";
14   version = "8.0.29";
15   format = "setuptools";
17   disabled = pythonOlder "3.7";
19   src = fetchFromGitHub {
20     owner = "mysql";
21     repo = "mysql-connector-python";
22     rev = version;
23     hash = "sha256-X0qiXNYkNoR00ESUdByPj4dPnEnjLyopm25lm1JvkAk=";
24   };
26   patches = [
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
35     (fetchpatch {
36       url = "https://github.com/mysql/mysql-connector-python/commit/fd24ce9dc8c60cc446a8e69458f7851d047c7831.patch";
37       sha256 = "sha256-WvU1iB53MavCsksKCjGvUl7R3Ww/38alxxMVzjpr5Xg=";
38     })
39   ];
41   propagatedBuildInputs = [
42     dnspython
43     protobuf
44   ];
46   pythonImportsCheck = [
47     "mysql"
48   ];
50   # Tests require a running MySQL instance
51   doCheck = false;
53   meta = with lib; {
54     description = "A MySQL driver";
55     longDescription = ''
56       A MySQL driver that does not depend on MySQL C client libraries and
57       implements the DB API v2.0 specification.
58     '';
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 ];
63   };