Merge pull request #54425 from eadwu/init/srhtPackages

sourcehut: init
This commit is contained in:
Joachim F
2019-08-14 14:50:59 +00:00
committed by GitHub
26 changed files with 1045 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
{ lib, isPy3k, fetchPypi, buildPythonPackage
, atpublic }:
buildPythonPackage rec {
pname = "aiosmtpd";
version = "1.2";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "1xdfk741pjmz1cm8dsi4n5vq4517i175rm94696m3f7kcgk7xsmp";
};
propagatedBuildInputs = [
atpublic
];
# Tests need network access
doCheck = false;
meta = with lib; {
homepage = https://aiosmtpd.readthedocs.io/en/latest/;
description = "Asyncio based SMTP server";
longDescription = ''
This is a server for SMTP and related protocols, similar in utility to the
standard library's smtpd.py module, but rewritten to be based on asyncio for
Python 3.
'';
license = licenses.asl20;
maintainers = with maintainers; [ eadwu ];
};
}

View File

@@ -0,0 +1,38 @@
{ lib, isPy3k, fetchPypi, fetchpatch, buildPythonPackage
, uvloop, postgresql }:
buildPythonPackage rec {
pname = "asyncpg";
version = "0.18.3";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "0rrch478ww6ipmh3617sb2jzwsq4w7pjcck869p35zb0mk5fr9aq";
};
patches = [
(fetchpatch {
url = "https://github.com/MagicStack/asyncpg/commit/aaeb7076e5acb045880b46155014c0640624797e.patch";
sha256 = "0r6g6pvb39vzci8g67mv9rlrvavqvfz6vlv8988wv53bpz1mss3p";
})
];
checkInputs = [
uvloop
postgresql
];
meta = with lib; {
homepage = https://github.com/MagicStack/asyncpg;
description = "An asyncio PosgtreSQL driver";
longDescription = ''
Asyncpg is a database interface library designed specifically for
PostgreSQL and Python/asyncio. asyncpg is an efficient, clean
implementation of PostgreSQL server binary protocol for use with Pythons
asyncio framework.
'';
license = licenses.asl20;
maintainers = with maintainers; [ eadwu ];
};
}

View File

@@ -0,0 +1,38 @@
{ lib, isPy3k, fetchPypi, buildPythonPackage
, pytest }:
buildPythonPackage rec {
pname = "atpublic";
version = "1.0";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "0i3sbxkdlbb4560rrlmwwd5y4ps7k73lp4d8wnmd7ag9k426gjkx";
};
checkInputs = [
pytest
];
checkPhase = ''
pytest --pyargs public
'';
meta = with lib; {
homepage = https://public.readthedocs.io/en/latest/;
description = "A decorator and function which populates a module's __all__ and globals";
longDescription = ''
This is a very simple decorator and function which populates a module's
__all__ and optionally the module globals.
This provides both a pure-Python implementation and a C implementation. It is
proposed that the C implementation be added to builtins_ for Python 3.6.
This proposal seems to have been rejected, for more information see
https://bugs.python.org/issue26632.
'';
license = licenses.asl20;
maintainers = with maintainers; [ eadwu ];
};
}

View File

@@ -0,0 +1,29 @@
{ lib, fetchFromGitHub, buildPythonPackage
, python, isPy3k }:
buildPythonPackage rec {
pname = "emailthreads";
version = "0.1.0";
disabled = !isPy3k;
# pypi is missing files for tests
src = fetchFromGitHub {
owner = "emersion";
repo = "python-emailthreads";
rev = "v${version}";
sha256 = "17pfal8kbxhs025apkijqbkppw2lljca8x1cwcx49jv60h05c3cn";
};
PKGVER = version;
checkPhase = ''
${python.interpreter} -m unittest discover test
'';
meta = with lib; {
homepage = https://github.com/emersion/python-emailthreads;
description = "Python library to parse and format email threads";
license = licenses.mit;
maintainers = with maintainers; [ eadwu ];
};
}

View File

@@ -0,0 +1,40 @@
{ lib, fetchPypi, buildPythonPackage
, flake8
, mock, pep8, pytest }:
buildPythonPackage rec {
pname = "flake8-polyfill";
version = "1.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4";
};
postPatch = ''
# Failed: [pytest] section in setup.cfg files is no longer supported, change to [tool:pytest] instead.
substituteInPlace setup.cfg \
--replace pytest 'tool:pytest'
'';
propagatedBuildInputs = [
flake8
];
checkInputs = [
mock
pep8
pytest
];
checkPhase = ''
pytest tests
'';
meta = with lib; {
homepage = https://gitlab.com/pycqa/flake8-polyfill;
description = "Polyfill package for Flake8 plugins";
license = licenses.mit;
maintainers = with maintainers; [ eadwu ];
};
}

View File

@@ -0,0 +1,23 @@
{ lib, fetchPypi, buildPythonPackage
, flake8-polyfill }:
buildPythonPackage rec {
pname = "pep8-naming";
version = "0.8.2";
src = fetchPypi {
inherit pname version;
sha256 = "1aff4g3i2z08cx7z17nbxbf32ddrnvqlk16h6d8h9s9w5ymivjq1";
};
propagatedBuildInputs = [
flake8-polyfill
];
meta = with lib; {
homepage = https://github.com/PyCQA/pep8-naming;
description = "Check PEP-8 naming conventions, plugin for flake8";
license = licenses.mit;
maintainers = with maintainers; [ eadwu ];
};
}

View File

@@ -0,0 +1,48 @@
{ lib, isPy3k, fetchFromGitHub, buildPythonPackage
, six, enum34, pyasn1, cryptography, singledispatch
, fetchPypi
, gpgme, flake8, pytest, pytestcov, pep8-naming, pytest-ordering }:
buildPythonPackage rec {
pname = "pgpy";
version = "0.5.2";
src = fetchFromGitHub {
owner = "SecurityInnovation";
repo = "PGPy";
rev = version;
sha256 = "1v2b1dyq1sl48d2gw7vn4hv6sasd9ihpzzcq8yvxj9dgfak2y663";
};
propagatedBuildInputs = [
six
pyasn1
cryptography
singledispatch
] ++ lib.optional (!isPy3k) enum34;
checkInputs = [
gpgme
flake8
pytest
pytestcov
pep8-naming
pytest-ordering
];
checkPhase = ''
pytest
'';
meta = with lib; {
homepage = https://github.com/SecurityInnovation/PGPy;
description = "Pretty Good Privacy for Python 2 and 3";
longDescription = ''
PGPy is a Python (2 and 3) library for implementing Pretty Good Privacy
into Python programs, conforming to the OpenPGP specification per RFC
4880.
'';
license = licenses.bsd3;
maintainers = with maintainers; [ eadwu ];
};
}

View File

@@ -0,0 +1,31 @@
{ lib, fetchFromGitHub, buildPythonPackage
, pytest }:
buildPythonPackage rec {
pname = "pytest-ordering";
version = "unstable-2019-06-19";
# Pypi lacks tests/
# Resolves PytestUnknownMarkWarning from pytest
src = fetchFromGitHub {
owner = "ftobia";
repo = pname;
rev = "492697ee26633cc31d329c1ceaa468375ee8ee9c";
sha256 = "1xim0kj5g37p1skgvp8gdylpx949krmx60w3pw6j1m1h7sakmddn";
};
checkInputs = [
pytest
];
checkPhase = ''
pytest tests
'';
meta = with lib; {
homepage = https://github.com/ftobia/pytest-ordering;
description = "Pytest plugin to run your tests in a specific order";
license = licenses.mit;
maintainers = with maintainers; [ eadwu ];
};
}

View File

@@ -0,0 +1,50 @@
{ lib, fetchPypi, buildPythonPackage
, six, sqlalchemy
, mock, pytz, isort, flake8, jinja2, pg8000, pyodbc, pytest, pymysql, dateutil
, docutils, flexmock, psycopg2, pygments }:
buildPythonPackage rec {
pname = "sqlalchemy-utils";
version = "0.34.0";
src = fetchPypi {
inherit version;
pname = "SQLAlchemy-Utils";
sha256 = "0rlixs084isgxsvvpz96njqzikvg8x021sgjp4yj71jpd8blvg8f";
};
propagatedBuildInputs = [
six
sqlalchemy
];
# Attempts to access localhost and there's also no database access
doCheck = false;
checkInputs = [
mock
pytz
isort
flake8
jinja2
pg8000
pyodbc
pytest
pymysql
dateutil
docutils
flexmock
psycopg2
pygments
];
checkPhase = ''
pytest tests
'';
meta = with lib; {
homepage = https://github.com/kvesteri/sqlalchemy-utils;
description = "Various utility functions and datatypes for SQLAlchemy";
license = licenses.bsd3;
maintainers = with maintainers; [ eadwu ];
};
}