commit
c74d28156f
File diff suppressed because one or more lines are too long
@ -0,0 +1,57 @@ |
||||
{ lib |
||||
, aiosmtpd |
||||
, buildPythonPackage |
||||
, fetchFromGitHub |
||||
, fetchpatch |
||||
, hypothesis |
||||
, poetry-core |
||||
, pytest-asyncio |
||||
, pytestCheckHook |
||||
, pythonOlder |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "aiosmtplib"; |
||||
version = "1.1.6"; |
||||
format = "pyproject"; |
||||
|
||||
disabled = pythonOlder "3.7"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "cole"; |
||||
repo = pname; |
||||
rev = "v${version}"; |
||||
hash = "sha256-bo+u3I+ZX95UYkEam2TB6d6rvbYKa5Qu/9oNX5le478="; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ |
||||
poetry-core |
||||
]; |
||||
|
||||
checkInputs = [ |
||||
aiosmtpd |
||||
hypothesis |
||||
pytest-asyncio |
||||
pytestCheckHook |
||||
]; |
||||
|
||||
patches = [ |
||||
# Switch to poetry-core, https://github.com/cole/aiosmtplib/pull/183 |
||||
(fetchpatch { |
||||
name = "switch-to-poetry-core.patch"; |
||||
url = "https://github.com/cole/aiosmtplib/commit/3aba1c132d9454e05d4281f4c8aa618b4e1b783d.patch"; |
||||
hash = "sha256-KlA46gD6swfJ/3OLO3xWZWa66Gx1/izmUMQ60PQy0po="; |
||||
}) |
||||
]; |
||||
|
||||
pythonImportsCheck = [ |
||||
"aiosmtplib" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Module which provides a SMTP client"; |
||||
homepage = "https://github.com/cole/aiosmtplib"; |
||||
license = with licenses; [ mit ]; |
||||
maintainers = with maintainers; [ fab ]; |
||||
}; |
||||
} |
@ -0,0 +1,72 @@ |
||||
{ lib |
||||
, aioredis |
||||
, aiosmtplib |
||||
, blinker |
||||
, buildPythonPackage |
||||
, email_validator |
||||
, fakeredis |
||||
, fastapi |
||||
, fetchFromGitHub |
||||
, httpx |
||||
, jinja2 |
||||
, poetry-core |
||||
, pydantic |
||||
, pytest-asyncio |
||||
, pytestCheckHook |
||||
, python-multipart |
||||
, pythonOlder |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "fastapi-mail"; |
||||
version = "1.0.8"; |
||||
format = "pyproject"; |
||||
|
||||
disabled = pythonOlder "3.7"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "sabuhish"; |
||||
repo = pname; |
||||
rev = version; |
||||
hash = "sha256-PkA7qkdDUd7mrtvb6IbCzFRq6X0M3iKY+FKuNConJ5A="; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ |
||||
poetry-core |
||||
]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
aioredis |
||||
aiosmtplib |
||||
blinker |
||||
email_validator |
||||
fakeredis |
||||
fastapi |
||||
httpx |
||||
jinja2 |
||||
pydantic |
||||
python-multipart |
||||
]; |
||||
|
||||
checkInputs = [ |
||||
pytest-asyncio |
||||
pytestCheckHook |
||||
]; |
||||
|
||||
disabledTests = [ |
||||
# Tests require access to /etc/resolv.conf |
||||
"test_default_checker" |
||||
"test_redis_checker" |
||||
]; |
||||
|
||||
pythonImportsCheck = [ |
||||
"fastapi_mail" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Module for sending emails and attachments"; |
||||
homepage = "https://github.com/sabuhish/fastapi-mail"; |
||||
license = with licenses; [ mit ]; |
||||
maintainers = with maintainers; [ fab ]; |
||||
}; |
||||
} |
@ -0,0 +1,98 @@ |
||||
diff --git a/conftest.py b/conftest.py
|
||||
index 9e146cd..8dbc9a5 100644
|
||||
--- a/conftest.py
|
||||
+++ b/conftest.py
|
||||
@@ -61,16 +61,12 @@ def mysql_db_user():
|
||||
|
||||
@pytest.fixture
|
||||
def postgresql_dsn(postgresql_db_user, postgresql_db_password, db_name):
|
||||
- return 'postgresql://{0}:{1}@localhost/{2}'.format(
|
||||
- postgresql_db_user,
|
||||
- postgresql_db_password,
|
||||
- db_name
|
||||
- )
|
||||
+ pytest.skip()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mysql_dsn(mysql_db_user, db_name):
|
||||
- return 'mysql+pymysql://{0}@localhost/{1}'.format(mysql_db_user, db_name)
|
||||
+ pytest.skip()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -108,8 +104,7 @@ def mssql_db_driver():
|
||||
|
||||
@pytest.fixture
|
||||
def mssql_dsn(mssql_db_user, mssql_db_password, mssql_db_driver, db_name):
|
||||
- return 'mssql+pyodbc://{0}:{1}@localhost/{2}?driver={3}'\
|
||||
- .format(mssql_db_user, mssql_db_password, db_name, mssql_db_driver)
|
||||
+ pytest.skip()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
diff --git a/tests/functions/test_database.py b/tests/functions/test_database.py
|
||||
index 0ad6721..83f208d 100644
|
||||
--- a/tests/functions/test_database.py
|
||||
+++ b/tests/functions/test_database.py
|
||||
@@ -76,28 +76,6 @@ class TestDatabasePostgres(DatabaseTest):
|
||||
"TEMPLATE my_template") in str(excinfo.value)
|
||||
|
||||
|
||||
-class TestDatabasePostgresPg8000(DatabaseTest):
|
||||
-
|
||||
- @pytest.fixture
|
||||
- def dsn(self, postgresql_db_user, postgresql_db_password):
|
||||
- return 'postgresql+pg8000://{0}:{1}@localhost/{2}'.format(
|
||||
- postgresql_db_user,
|
||||
- postgresql_db_password,
|
||||
- 'db_to_test_create_and_drop_via_pg8000_driver'
|
||||
- )
|
||||
-
|
||||
-
|
||||
-class TestDatabasePostgresPsycoPG2CFFI(DatabaseTest):
|
||||
-
|
||||
- @pytest.fixture
|
||||
- def dsn(self, postgresql_db_user, postgresql_db_password):
|
||||
- return 'postgresql+psycopg2cffi://{0}:{1}@localhost/{2}'.format(
|
||||
- postgresql_db_user,
|
||||
- postgresql_db_password,
|
||||
- 'db_to_test_create_and_drop_via_psycopg2cffi_driver'
|
||||
- )
|
||||
-
|
||||
-
|
||||
@pytest.mark.usefixtures('postgresql_dsn')
|
||||
class TestDatabasePostgresWithQuotedName(DatabaseTest):
|
||||
|
||||
@@ -116,31 +94,6 @@ class TestDatabasePostgresWithQuotedName(DatabaseTest):
|
||||
'TEMPLATE "my-template"') in str(excinfo.value)
|
||||
|
||||
|
||||
-class TestDatabasePostgresCreateDatabaseCloseConnection(object):
|
||||
- def test_create_database_twice(
|
||||
- self,
|
||||
- postgresql_db_user,
|
||||
- postgresql_db_password
|
||||
- ):
|
||||
- dsn_list = [
|
||||
- 'postgresql://{0}:{1}@localhost/db_test_sqlalchemy-util-a'.format(
|
||||
- postgresql_db_user,
|
||||
- postgresql_db_password
|
||||
- ),
|
||||
- 'postgresql://{0}:{1}@localhost/db_test_sqlalchemy-util-b'.format(
|
||||
- postgresql_db_user,
|
||||
- postgresql_db_password
|
||||
- ),
|
||||
- ]
|
||||
- for dsn_item in dsn_list:
|
||||
- assert not database_exists(dsn_item)
|
||||
- create_database(dsn_item, template="template1")
|
||||
- assert database_exists(dsn_item)
|
||||
- for dsn_item in dsn_list:
|
||||
- drop_database(dsn_item)
|
||||
- assert not database_exists(dsn_item)
|
||||
-
|
||||
-
|
||||
@pytest.mark.usefixtures('mssql_dsn')
|
||||
class TestDatabaseMssql(DatabaseTest):
|
||||
|
@ -0,0 +1,35 @@ |
||||
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, popt, alsaLib }: |
||||
|
||||
stdenv.mkDerivation { |
||||
pname = "nano-tts"; |
||||
version = "unstable-2021-02-22"; |
||||
|
||||
src = fetchFromGitHub { |
||||
repo = "nanotts"; |
||||
owner = "gmn"; |
||||
rev = "d8b91f3d9d524c30f6fe8098ea7a0a638c889cf9"; |
||||
sha256 = "sha256-bFu3U50zc90iQeWkqOsCipkueJUZI3cW5342jjYSnGI="; |
||||
}; |
||||
|
||||
strictDeps = true; |
||||
nativeBuildInputs = [ autoconf automake libtool ]; |
||||
buildInputs = [ popt alsaLib ]; |
||||
|
||||
patchPhase = '' |
||||
substituteInPlace "src/main.cpp" --replace "/usr/share/pico/lang" "$out/share/lang" |
||||
echo "" > update_build_version.sh |
||||
''; |
||||
|
||||
installPhase = '' |
||||
install -Dm755 -t $out/bin nanotts |
||||
install -Dm644 -t $out/share/lang $src/lang/* |
||||
''; |
||||
|
||||
meta = { |
||||
description = "Speech synthesizer commandline utility that improves pico2wave, included with SVOX PicoTTS"; |
||||
homepage = "https://github.com/gmn/nanotts"; |
||||
license = lib.licenses.asl20; |
||||
maintainers = [ lib.maintainers.strikerlulu ]; |
||||
platforms = lib.platforms.linux; |
||||
}; |
||||
} |
Loading…
Reference in new issue