aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/aiomysql/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/aiomysql/default.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/python-modules/aiomysql/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/aiomysql/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/aiomysql/default.nix
new file mode 100644
index 000000000000..4de8eaba3d8f
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/aiomysql/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pymysql
+, pytest
+, isPy27
+}:
+
+buildPythonPackage rec {
+ pname = "aiomysql";
+ version = "0.0.21";
+ disabled = isPy27;
+
+ src = fetchFromGitHub {
+ owner = "aio-libs";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "1qvy3phbsxp55161dnppjfx2m1kn82v0irc3xzqw0adfd81vaiad";
+ };
+
+ propagatedBuildInputs = [
+ pymysql
+ ];
+
+ checkInputs = [
+ pytest
+ ];
+
+ postPatch = ''
+ substituteInPlace setup.py \
+ --replace "PyMySQL>=0.9,<=0.9.2" "PyMySQL"
+ '';
+
+ checkPhase = ''
+ pytest
+ '';
+
+ # tests require mysql database
+ doCheck = false;
+
+ meta = with lib; {
+ description = "MySQL driver for asyncio";
+ homepage = "https://github.com/aio-libs/aiomysql";
+ license = licenses.mit;
+ maintainers = [ maintainers.costrouc ];
+ };
+}