Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2020-06-24 19:04:03 +02:00
154 changed files with 1609 additions and 808 deletions

View File

@@ -5,13 +5,13 @@
}:
buildPythonPackage rec {
version = "0.3.0";
version = "0.4.0";
pname = "azure-mgmt-security";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "0z766424783a6y5dp5ybxssb0bfzqb8kpa6zra8ccnbfg4fn478v";
sha256 = "1gpkvvk4prx6khs6vrlbqlg6zarsmplg3k9zbymxfm6irriqildm";
extension = "zip";
};

View File

@@ -10,12 +10,12 @@
buildPythonPackage rec {
pname = "azure-mgmt-web";
version = "0.46.0";
version = "0.47.0";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "e1988aa2b91e6b5aa84e48ac02d5546945bdc2d8331744869e923ba15066c4a6";
sha256 = "1s6c477q2kpyiqkisw6l70ydyjkv3ay6zjjj4jl4ipv05a7356kq";
};
propagatedBuildInputs = [

View File

@@ -1,15 +1,17 @@
{ stdenv, lib, buildPythonPackage, fetchFromGitHub, openssl }:
{ stdenv, lib, buildPythonPackage, isPy3k, fetchFromGitHub, openssl }:
let ext = if stdenv.isDarwin then "dylib" else "so";
in buildPythonPackage rec {
pname = "bitcoinlib";
version = "0.9.0";
version = "0.11.0";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "petertodd";
rev = "7a8a47ec6b722339de1d0a8144e55b400216f90f";
repo = "python-bitcoinlib";
sha256 = "1s1jm2nid7ab7yiwlp1n2v3was9i4q76xmm07wvzpd2zvn5zb91z";
rev = "python-${pname}-v${version}";
sha256 = "0pwypd966zzivb37fvg4l6yr7ihplqnr1jwz9zm3biip7x89bdzm";
};
postPatch = ''
@@ -21,7 +23,7 @@ in buildPythonPackage rec {
meta = {
homepage = src.meta.homepage;
description = "Easy interface to the Bitcoin data structures and protocol";
license = with lib.licenses; [ gpl3 ];
license = with lib.licenses; [ lgpl3 ];
maintainers = with lib.maintainers; [ jb55 ];
};
}

View File

@@ -1,10 +1,19 @@
{ stdenv, fetchPypi, buildPythonPackage, pythonAtLeast, isPy3k
, more-itertools, six, setuptools_scm, setuptools-scm-git-archive
, pytest, pytestcov, portend, pytest-testmon, pytest-mock
, backports_unittest-mock, pyopenssl, requests, trustme, requests-unixsocket
, backports_functools_lru_cache }:
let inherit (stdenv) lib; in
{ lib, stdenv, fetchPypi, buildPythonPackage, isPy3k
, jaraco_text
, more-itertools
, portend
, pyopenssl
, pytestCheckHook
, pytestcov
, pytest-mock
, pytest-testmon
, requests
, requests-unixsocket
, setuptools_scm
, setuptools-scm-git-archive
, six
, trustme
}:
buildPythonPackage rec {
pname = "cheroot";
@@ -19,21 +28,39 @@ buildPythonPackage rec {
nativeBuildInputs = [ setuptools_scm setuptools-scm-git-archive ];
propagatedBuildInputs = [ more-itertools six backports_functools_lru_cache ];
propagatedBuildInputs = [ more-itertools six ];
checkInputs = [ pytest pytestcov portend backports_unittest-mock pytest-mock pytest-testmon pyopenssl requests trustme requests-unixsocket ];
checkInputs = [
jaraco_text
portend
pyopenssl
pytestCheckHook
pytestcov
pytest-mock
pytest-testmon
requests
requests-unixsocket
trustme
];
# Disable doctest plugin because times out
# Disable xdist (-n arg) because it's incompatible with testmon
# Deselect test_bind_addr_unix on darwin because times out
# Deselect test_http_over_https_error on darwin because builtin cert fails
# Disable warnings-as-errors because of deprecation warnings from socks on python 3.7
checkPhase = ''
substituteInPlace pytest.ini --replace "--doctest-modules" "" --replace "-n auto" ""
${lib.optionalString (pythonAtLeast "3.7") "sed -i '/warnings/,+2d' pytest.ini"}
pytest -k 'not tls' ${lib.optionalString stdenv.isDarwin "--deselect=cheroot/test/test_ssl.py::test_http_over_https_error --deselect=cheroot/test/test_server.py::test_bind_addr_unix"}
# adds many other pytest utilities which aren't necessary like linting
preCheck = ''
rm pytest.ini
'';
disabledTests= [
"tls" # touches network
"peercreds_unix_sock" # test urls no longer allowed
] ++ lib.optionals stdenv.isDarwin [
"http_over_https_error"
"bind_addr_unix"
];
# Some of the tests use localhost networking.
__darwinAllowLocalNetworking = true;

View File

@@ -5,11 +5,11 @@
buildPythonPackage rec {
pname = "dash_core_components";
version = "1.10.0";
version = "1.10.1";
src = fetchPypi {
inherit pname version;
sha256 = "1bqvxm7h3b0wah32jrsn919hp4xr1zlkxclbs261mvd57ps0rf9h";
sha256 = "02115plwhvyrmal01xp2964w8psysr2kf4ink8mh9z7kmda98l68";
};
# No tests in archive

View File

@@ -5,11 +5,11 @@
buildPythonPackage rec {
pname = "dash_renderer";
version = "1.4.1";
version = "1.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "11fl7756zshlrfiqcr6rcg1m0c4434vdg1bkrcjl54hl02k3pcmv";
sha256 = "14fp66vasfag1bss09qyjnqa000g56q7vcap3ig57xycflks4c3y";
};
# No tests in archive

View File

@@ -5,11 +5,11 @@
buildPythonPackage rec {
pname = "dash_table";
version = "4.7.0";
version = "4.8.1";
src = fetchPypi {
inherit pname version;
sha256 = "0md7qqjpsarc8ymfccvsqgj6mgq8gxl09im5v5yxhv8hv24yy4jm";
sha256 = "16q0d9fidllxm7p51i5p4vzknnc09d114zqw3f4a2spr7llga7xj";
};
# No tests in archive

View File

@@ -16,13 +16,13 @@
buildPythonPackage rec {
pname = "dash";
version = "1.12.0";
version = "1.13.3";
src = fetchFromGitHub {
owner = "plotly";
repo = pname;
rev = "v${version}";
sha256 = "0nr5ppjbfmay0d3bah26i4k8xj6xyp24gq0cqlv9lzdrbdd3j9wy";
sha256 = "131p725rc731ynksp12h9j1faq3vl51d5p64ln22r7zx4pvahss5";
};
propagatedBuildInputs = [

View File

@@ -0,0 +1,33 @@
{ lib, buildPythonPackage, fetchPypi
, pytestrunner
, setuptools
, coverage, pytest
}:
buildPythonPackage rec {
pname = "diceware";
version = "0.9.6";
src = fetchPypi {
inherit pname version;
sha256 = "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby";
};
nativeBuildInputs = [ pytestrunner ];
propagatedBuildInputs = [ setuptools ];
checkInputs = [ coverage pytest ];
# see https://github.com/ulif/diceware/commit/a7d844df76cd4b95a717f21ef5aa6167477b6733
checkPhase = ''
py.test -m 'not packaging'
'';
meta = with lib; {
description = "Generates passphrases by concatenating words randomly picked from wordlists";
homepage = "https://github.com/ulif/diceware";
license = licenses.gpl3;
maintainers = with maintainers; [ asymmetric ];
};
}

View File

@@ -36,7 +36,7 @@ let
bazelTarget = ":install";
fetchAttrs = {
sha256 = "1xwrha692if7rwqc0qalgpx9b8indgdan8ppwlcs2v47wjvgg6h3";
sha256 = "1gag2xghik68zblhwbdd206hs8nxp2sclw182x2qi78jqgfnq5ci";
};
bazelFlags = [

View File

@@ -8,12 +8,16 @@
, wtf-peewee
, sqlalchemy
, sqlalchemy-citext
, sqlalchemy-utils
, flask-mongoengine
, flask_sqlalchemy
, flask-babelex
, shapely
, geoalchemy2
, psycopg2
, arrow
, colour
, email_validator
, flask
, wtforms
, isPy27
@@ -22,12 +26,12 @@
buildPythonPackage rec {
pname = "flask-admin";
version = "1.5.3";
version = "1.5.6";
src = fetchPypi {
pname = "Flask-Admin";
inherit version;
sha256 = "ca0be6ec11a6913b73f656c65c444ae5be416c57c75638dd3199376ce6bc7422";
sha256 = "1f31vzc0p2xni5mh1wvjk9jxf4ddlx2fj4r0f3vv2n9db3c63iv8";
};
checkInputs = [
@@ -38,12 +42,16 @@ buildPythonPackage rec {
wtf-peewee
sqlalchemy
sqlalchemy-citext
sqlalchemy-utils
flask-mongoengine
flask_sqlalchemy
flask-babelex
shapely
geoalchemy2
psycopg2
arrow
colour
email_validator
];
propagatedBuildInputs = [
@@ -52,13 +60,14 @@ buildPythonPackage rec {
] ++ lib.optionals isPy27 [ enum34 ];
checkPhase = ''
# disable tests that require mongodb, postresql
# disable tests that require mongodb, postresql, or network
nosetests \
-e "mongoengine" \
-e "pymongo" \
-e "test_form_upload" \
-e "test_postgres" \
-e "geoa" \
-e "test_ajax_fk" \
flask_admin/tests
'';

View File

@@ -1,37 +1,27 @@
{ lib, buildPythonPackage, fetchPypi, fetchpatch, isPy3k
, nose, mock, blinker
, nose, mock, blinker, pytest
, flask, six, pytz, aniso8601, pycrypto
}:
buildPythonPackage rec {
pname = "Flask-RESTful";
version = "0.3.6";
version = "0.3.8";
src = fetchPypi {
inherit pname version;
sha256 = "01rlvl2iq074ciyn4schmjip7cyplkwkysbb8f610zil06am35ap";
sha256 = "05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay";
};
patches = [
(fetchpatch {
url = "https://github.com/flask-restful/flask-restful/commit/54979f0a49b2217babc53c5b65b5df10b6de8e05.patch";
sha256 = "11s6ag6l42g61ccg5jw9j1f26hwgjfa3sp890cbl5r4hy5ycpyr5";
})
(fetchpatch {
url = "https://github.com/flask-restful/flask-restful/commit/f45e81a45ed03922fd225afe27006315811077e6.patch";
sha256 = "16avd369j5r08d1l23mwbba26zjwnmfqvfvnfz02am3gr5l6p3gl";
})
];
postPatch = lib.optionalString isPy3k ''
# TypeError: Only byte strings can be passed to C code
rm tests/test_crypto.py tests/test_paging.py
'';
checkInputs = [ nose mock blinker ];
propagatedBuildInputs = [ flask six pytz aniso8601 pycrypto ];
checkInputs = [ pytest nose mock blinker ];
# test_reqparse.py: werkzeug move Multidict location (only imported in tests)
# handle_non_api_error isn't updated for addition encoding argument
checkPhase = ''
pytest --ignore=tests/test_reqparse.py -k 'not handle_non_api_error'
'';
meta = with lib; {
homepage = "https://flask-restful.readthedocs.io/";
description = "REST API building blocks for Flask";

View File

@@ -3,6 +3,7 @@
, fetchFromGitHub
, isPy3k
, flask
, werkzeug
}:
buildPythonPackage rec {
@@ -20,8 +21,13 @@ buildPythonPackage rec {
disabled = !isPy3k;
postPatch = ''
sed -i 's@werkzeug.contrib.fixers@werkzeug.middleware.proxy_fix@g' flask_reverse_proxy_fix/middleware/__init__.py
'';
propagatedBuildInputs = [
flask
werkzeug
];
meta = with stdenv.lib; {

View File

@@ -3,6 +3,8 @@
, fetchPypi
, sqlalchemy
, shapely
, setuptools_scm
, pytest
}:
buildPythonPackage rec {
@@ -14,8 +16,12 @@ buildPythonPackage rec {
sha256 = "a5a2444d90ce7f2c6b2d7bd7346c8aed16fd32c3e190e631576a51814e8f7ee9";
};
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ sqlalchemy shapely ];
# https://github.com/geoalchemy/geoalchemy2/blob/e05a676350b11f0e73609379dae5625c5de2e868/TEST.rst
doCheck = false;
meta = with stdenv.lib; {
homepage = "http://geoalchemy.org/";
license = licenses.mit;

View File

@@ -1,30 +1,26 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, tox
, pytest
, pylint
, mypy
, black
, git
, fetchFromGitHub
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "git-revise";
version = "0.5.1";
version = "0.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "0l3xhg00106p7ysg4gl9dna2zcrax58mzmm0ajjaxw58jfn8wsf1";
# Missing tests on PyPI
src = fetchFromGitHub {
owner = "mystor";
repo = pname;
rev = "v${version}";
sha256 = "03v791yhips9cxz9hr07rhsgxfhwyqq17rzi7ayjhwvy65s4hzs9";
};
disabled = pythonOlder "3.6";
checkInputs = [ tox pytest pylint mypy black ];
checkPhase = ''
tox
'';
checkInputs = [ git pytestCheckHook ];
meta = with lib; {
description = "Efficiently update, split, and rearrange git commits";

View File

@@ -1,8 +1,9 @@
{ buildPythonPackage, fetchPypi, setuptools_scm, nose, six, importlib-metadata, toml }:
{ buildPythonPackage, fetchPypi, isPy27, setuptools_scm, nose, six, importlib-metadata, toml }:
buildPythonPackage rec {
pname = "inflect";
version = "4.1.0";
disabled = isPy27;
src = fetchPypi {
inherit pname version;

View File

@@ -1,4 +1,4 @@
{ buildPythonPackage, fetchPypi, isPy3k
{ lib, buildPythonPackage, fetchPypi, isPy3k
, six, jaraco_logging, jaraco_text, jaraco_stream, pytz, jaraco_itertools
, setuptools_scm, jaraco_collections, importlib-metadata
}:
@@ -16,7 +16,7 @@ buildPythonPackage rec {
doCheck = false;
buildInputs = [ setuptools_scm ];
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [
six
importlib-metadata
@@ -27,4 +27,11 @@ buildPythonPackage rec {
jaraco_itertools
jaraco_collections
];
meta = with lib; {
description = "IRC (Internet Relay Chat) protocol library for Python";
homepage = "https://github.com/jaraco/irc";
license = licenses.mit;
maintainers = [];
};
}

View File

@@ -1,38 +0,0 @@
From fcffcc61e432e5250e7fbfb1ecbe0f1cac3006cf Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Sun, 10 Mar 2019 13:10:18 +0100
Subject: [PATCH] Don't run flake8 checks during the build
If the code simply violates their code style, the Nix package shouldn't fail.
---
pytest.ini | 2 +-
setup.cfg | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/pytest.ini b/pytest.ini
index d165e5e..d8e4694 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -1,6 +1,6 @@
[pytest]
norecursedirs=dist build .tox .eggs
-addopts=--doctest-modules --flake8
+addopts=--doctest-modules
doctest_optionflags=ALLOW_UNICODE ELLIPSIS ALLOW_BYTES
filterwarnings=
ignore:Possible nested set::pycodestyle:113
diff --git a/setup.cfg b/setup.cfg
index 9f3517f..c9033ec 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -30,7 +30,6 @@ setup_requires = setuptools_scm >= 1.15.0
testing =
pytest >= 3.5, !=3.7.3
pytest-checkdocs
- pytest-flake8
docs =
sphinx
jaraco.packaging >= 3.2
--
2.18.1

View File

@@ -11,16 +11,18 @@ buildPythonPackage rec {
sha256 = "6447d567f57efe5efea386265c7864652e9530830a1b80f43e60b4f222b9ab84";
};
patches = [ ./0001-Don-t-run-flake8-checks-during-the-build.patch ];
buildInputs = [ setuptools_scm ];
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ inflect more-itertools six ];
checkInputs = [ pytest ];
# tests no longer available through pypi
doCheck = false;
checkPhase = ''
pytest
'';
pythonImportsCheck = [ "jaraco.itertools" ];
meta = with lib; {
description = "Tools for working with iterables";
homepage = "https://github.com/jaraco/jaraco.itertools";

View File

@@ -1,38 +0,0 @@
From 4b9801d9bbe535fd6719933b96278915573e3595 Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Sun, 10 Mar 2019 16:42:21 +0100
Subject: [PATCH] Don't run flake8 checks during the build
If the code simply violates their code style, the Nix package shouldn't fail.
---
pytest.ini | 2 +-
setup.cfg | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/pytest.ini b/pytest.ini
index 9b3c1ec..a5189c1 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -1,6 +1,6 @@
[pytest]
norecursedirs=dist build .tox .eggs
-addopts=--doctest-modules --flake8
+addopts=--doctest-modules
doctest_optionflags=ALLOW_UNICODE ELLIPSIS
filterwarnings=
ignore:Possible nested set::pycodestyle:113
diff --git a/setup.cfg b/setup.cfg
index 3e7bbed..5cac7a2 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -29,7 +29,6 @@ setup_requires = setuptools_scm >= 1.15.0
testing =
pytest >= 3.5, !=3.7.3
pytest-checkdocs
- pytest-flake8
docs =
sphinx
jaraco.packaging >= 3.2
--
2.18.1

View File

@@ -1,5 +1,5 @@
{ lib, buildPythonPackage, fetchPypi, setuptools_scm
, tempora, six, pytest
, tempora, six
}:
buildPythonPackage rec {
@@ -11,15 +11,13 @@ buildPythonPackage rec {
sha256 = "31716fe84d3d5df39d95572942513bd4bf8ae0a478f64031eff4c2ea9e83434e";
};
patches = [ ./0001-Don-t-run-flake8-checks-during-the-build.patch ];
buildInputs = [ setuptools_scm ];
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ tempora six ];
checkInputs = [ pytest ];
checkPhase = ''
PYTHONPATH=".:$PYTHONPATH" pytest
'';
# test no longer packaged with pypi
doCheck = false;
pythonImportsCheck = [ "jaraco.logging" ];
meta = with lib; {
description = "Support for Python logging facility";

View File

@@ -6,6 +6,7 @@
, ipython
, python
, scikit-build
, cmake
}:
buildPythonPackage rec {
@@ -17,9 +18,17 @@ buildPythonPackage rec {
sha256 = "7218ad6bd81f8649b211974bf108933910f016d66b49651effe7bbf63667d141";
};
nativeBuildInputs = [ cython ];
nativeBuildInputs = [
cython
cmake
scikit-build
];
propagatedBuildInputs = [ ipython scikit-build ];
dontUseCmakeConfigure = true;
propagatedBuildInputs = [
ipython
];
disabled = isPyPy;
@@ -27,8 +36,12 @@ buildPythonPackage rec {
rm -f _line_profiler.c
'';
checkInputs = [
ipython
];
checkPhase = ''
${python.interpreter} -m unittest discover -s tests
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH cd tests && ${python.interpreter} -m unittest discover -s .
'';
meta = {
@@ -36,6 +49,5 @@ buildPythonPackage rec {
homepage = "https://github.com/rkern/line_profiler";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fridh ];
broken = true;
};
}

View File

@@ -0,0 +1,57 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, python
, blinker, bugsnag, click, dropbox, fasteners, keyring, keyrings-alt, pathspec, Pyro5, requests, u-msgpack-python, watchdog
, sdnotify
, systemd
}:
buildPythonPackage rec {
pname = "maestral";
version = "1.1.0";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "SamSchott";
repo = "maestral";
rev = "v${version}";
sha256 = "0d1pxbg69ll07w4bbpzs7zz1yn82qyrym95b0mqmhrrg2ysxjngg";
};
propagatedBuildInputs = [
blinker
bugsnag
click
dropbox
fasteners
keyring
keyrings-alt
pathspec
Pyro5
requests
u-msgpack-python
watchdog
] ++ stdenv.lib.optionals stdenv.isLinux [
sdnotify
systemd
];
makeWrapperArgs = [
# Add the installed directories to the python path so the daemon can find them
"--prefix" "PYTHONPATH" ":" "${stdenv.lib.concatStringsSep ":" (map (p: p + "/lib/${python.libPrefix}/site-packages") (python.pkgs.requiredPythonModules propagatedBuildInputs))}"
"--prefix" "PYTHONPATH" ":" "$out/lib/${python.libPrefix}/site-packages"
];
# no tests
doCheck = false;
meta = with stdenv.lib; {
description = "Open-source Dropbox client for macOS and Linux";
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
inherit (src.meta) homepage;
};
}

View File

@@ -4,11 +4,11 @@
buildPythonPackage rec {
pname = "mautrix";
version = "0.5.4";
version = "0.5.7";
src = fetchPypi {
inherit pname version;
sha256 = "0csvk3y0y2r9gnfqj91fiqprgp8dxiv4n80b6myraab5s7zn1mvv";
sha256 = "0czymj9k9faky4dyrbxpr8rfrsb28xz9c0p66dcxvchk3m3ac49k";
};
propagatedBuildInputs = [

View File

@@ -0,0 +1,120 @@
{ lib
, fetchFromGitHub
, fetchurl
, buildPythonPackage
, pkgsStatic
, openssl
, invoke
, pytest
, tls-parser
, cacert
}:
let
zlibStatic = pkgsStatic.zlib;
nasslOpensslArgs = {
static = true;
enableSSL2 = true;
};
nasslOpensslFlagsCommon = [
"zlib"
"no-zlib-dynamic"
"no-shared"
"--with-zlib-lib=${zlibStatic.out}/lib"
"--with-zlib-include=${zlibStatic.out.dev}/include"
"enable-rc5"
"enable-md2"
"enable-gost"
"enable-cast"
"enable-idea"
"enable-ripemd"
"enable-mdc2"
"-fPIC"
];
opensslStatic = (openssl.override nasslOpensslArgs).overrideAttrs (
oldAttrs: rec {
name = "openssl-${version}";
version = "1.1.1";
src = fetchurl {
url = "https://www.openssl.org/source/${name}.tar.gz";
sha256 = "0gbab2fjgms1kx5xjvqx8bxhr98k4r8l2fa8vw7kvh491xd8fdi8";
};
configureFlags = oldAttrs.configureFlags ++ nasslOpensslFlagsCommon ++ [
"enable-weak-ssl-ciphers"
"enable-tls1_3"
"no-async"
];
patches = [ ./nix-ssl-cert-file.patch ];
buildInputs = oldAttrs.buildInputs ++ [ zlibStatic cacert ];
}
);
opensslLegacyStatic = (openssl.override nasslOpensslArgs).overrideAttrs (
oldAttrs: rec {
name = "openssl-${version}";
version = "1.0.2e";
src = fetchurl {
url = "https://www.openssl.org/source/${name}.tar.gz";
sha256 = "1zqb1rff1wikc62a7vj5qxd1k191m8qif5d05mwdxz2wnzywlg72";
};
configureFlags = oldAttrs.configureFlags ++ nasslOpensslFlagsCommon;
patches = [ ];
buildInputs = oldAttrs.buildInputs ++ [ zlibStatic ];
# openssl_1_0_2 needs `withDocs = false`
outputs = lib.remove "doc" oldAttrs.outputs;
}
);
in
buildPythonPackage rec {
pname = "nassl";
version = "3.0.0";
src = fetchFromGitHub {
owner = "nabla-c0d3";
repo = pname;
rev = version;
sha256 = "1dhgkpldadq9hg5isb6mrab7z80sy5bvzad2fb54pihnknfwhp8z";
};
postPatch = ''
mkdir -p deps/openssl-OpenSSL_1_0_2e/
cp ${opensslLegacyStatic.out}/lib/libssl.a \
${opensslLegacyStatic.out}/lib/libcrypto.a \
deps/openssl-OpenSSL_1_0_2e/
ln -s ${opensslLegacyStatic.out.dev}/include deps/openssl-OpenSSL_1_0_2e/include
ln -s ${opensslLegacyStatic.bin}/bin deps/openssl-OpenSSL_1_0_2e/apps
mkdir -p deps/openssl-OpenSSL_1_1_1/
cp ${opensslStatic.out}/lib/libssl.a \
${opensslStatic.out}/lib/libcrypto.a \
deps/openssl-OpenSSL_1_1_1/
ln -s ${opensslStatic.out.dev}/include deps/openssl-OpenSSL_1_1_1/include
ln -s ${opensslStatic.bin}/bin deps/openssl-OpenSSL_1_1_1/apps
mkdir -p deps/zlib-1.2.11/
cp ${zlibStatic.out}/lib/libz.a deps/zlib-1.2.11/
'';
propagatedBuildInputs = [ tls-parser ];
nativeBuildInputs = [ invoke ];
buildPhase = ''
invoke build.nassl
invoke package.wheel
'';
checkInputs = [ pytest ];
checkPhase = ''
# Skip online tests
pytest -k 'not Online'
'';
meta = with lib; {
homepage = "https://github.com/nabla-c0d3/nassl";
description = "Low-level OpenSSL wrapper for Python 3.7+";
platforms = with platforms; linux ++ darwin;
license = licenses.agpl3;
maintainers = with maintainers; [ veehaitch ];
};
}

View File

@@ -0,0 +1,14 @@
diff -ru -x '*~' openssl-1.0.2j-orig/crypto/x509/by_file.c openssl-1.0.2j/crypto/x509/by_file.c
--- openssl-1.0.2j-orig/crypto/x509/by_file.c 2016-09-26 11:49:07.000000000 +0200
+++ openssl-1.0.2j/crypto/x509/by_file.c 2016-10-13 16:54:31.400288302 +0200
@@ -97,7 +97,9 @@
switch (cmd) {
case X509_L_FILE_LOAD:
if (argl == X509_FILETYPE_DEFAULT) {
- file = getenv(X509_get_default_cert_file_env());
+ file = getenv("NIX_SSL_CERT_FILE");
+ if (!file)
+ file = getenv(X509_get_default_cert_file_env());
if (file)
ok = (X509_load_cert_crl_file(ctx, file,
X509_FILETYPE_PEM) != 0);

View File

@@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, isPy3k
, bitcoinlib, GitPython, pysha3, git }:
buildPythonPackage rec {
@@ -15,6 +15,14 @@ buildPythonPackage rec {
sha256 = "0c45ij8absfgwizq6dfgg81siq3y8605sgg184vazp292w8nqmqr";
};
patches = [
# build against bitcoinlib-0.11
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/opentimestamps/python-opentimestamps/pull/43.patch";
sha256 = "0bxzk4pzpqk7zrk2x7vn2bj2n3pc5whf8ijbd225s6674q450zbg";
})
];
# Remove a failing test which expects the test source file to reside in the
# project's Git repo
postPatch = ''

View File

@@ -22,7 +22,7 @@ buildPythonPackage rec {
checkInputs = [ pytestCheckHook ];
# ignore network related tests, which fail in sandbox
disabledTests = [ "StartNSfunc" "Broadcast" "GetIP" ];
disabledTests = [ "StartNSfunc" "Broadcast" "GetIP" "TestNameServer" "TestBCSetup" ];
meta = with lib; {
description = "Distributed object middleware for Python (RPC)";

View File

@@ -23,11 +23,12 @@ stdenv.mkDerivation rec {
"-DPYTHON_EXECUTABLE=${python.interpreter}"
];
nativeBuildInputs = [ cmake ninja qt5.qmake shiboken2 python ];
nativeBuildInputs = [ cmake ninja qt5.qmake python ];
buildInputs = with qt5; [
qtbase qtxmlpatterns qtmultimedia qttools qtx11extras qtlocation qtscript
qtwebsockets qtwebengine qtwebchannel qtcharts qtsensors qtsvg
];
propagatedBuildInputs = [ shiboken2 ];
meta = with stdenv.lib; {
description = "LGPL-licensed Python bindings for Qt";

View File

@@ -1,7 +1,7 @@
{
lib, fetchPypi, buildPythonPackage, isPy3k,
lib, fetchPypi, buildPythonPackage, isPy3k, pythonOlder,
# runtime dependencies
pandas, numpy, requests, inflection, python-dateutil, six, more-itertools,
pandas, numpy, requests, inflection, python-dateutil, six, more-itertools, importlib-metadata,
# test suite dependencies
nose, unittest2, flake8, httpretty, mock, jsondate, parameterized, faker, factory_boy,
# additional runtime dependencies are required on Python 2.x
@@ -45,6 +45,8 @@ buildPythonPackage rec {
pyOpenSSL
ndg-httpsclient
pyasn1
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
meta = with lib; {

View File

@@ -0,0 +1,52 @@
{ lib
, fetchFromGitHub
, pytest
, buildPythonPackage
, nassl
, cryptography
, typing-extensions
, faker
}:
buildPythonPackage rec {
pname = "sslyze";
version = "3.0.7";
src = fetchFromGitHub {
owner = "nabla-c0d3";
repo = pname;
rev = version;
sha256 = "1ahwldsh3xvagin09dy5q73bdw5k4siqy2qqgxwj4wdyd7pjb4p9";
};
patchPhase = ''
substituteInPlace setup.py \
--replace "cryptography>=2.6,<=2.9" "cryptography>=2.6,<=3"
'';
checkInputs = [ pytest ];
checkPhase = ''
# Most of the tests are online; hence, applicable tests are listed
# explicitly here
pytest \
tests/test_main.py \
tests/test_scanner.py \
tests/cli_tests/test_console_output.py \
tests/cli_tests/test_json_output.py \
tests/cli_tests/test_server_string_parser.py \
tests/plugins_tests/test_scan_commands.py \
tests/plugins_tests/certificate_info/test_certificate_utils.py \
-k "not (TestScanner and test_client_certificate_missing)"
'';
propagatedBuildInputs = [ nassl cryptography typing-extensions faker ];
meta = with lib; {
homepage = "https://github.com/nabla-c0d3/sslyze";
description = "Fast and powerful SSL/TLS scanning library";
platforms = platforms.linux ++ platforms.darwin;
license = licenses.agpl3;
maintainers = with maintainers; [ veehaitch ];
};
}

View File

@@ -1,5 +1,6 @@
{ lib, buildPythonPackage, fetchPypi
, setuptools_scm, pytest, freezegun, backports_unittest-mock
, pytest-black, pytestcov, pytest-flake8
, six, pytz, jaraco_functools }:
buildPythonPackage rec {
@@ -11,15 +12,15 @@ buildPythonPackage rec {
sha256 = "e370d822cf48f5356aab0734ea45807250f5120e291c76712a1d766b49ae34f8";
};
buildInputs = [ setuptools_scm ];
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ six pytz jaraco_functools ];
checkInputs = [ pytest freezegun backports_unittest-mock ];
checkInputs = [ pytest pytest-flake8 pytest-black pytestcov freezegun backports_unittest-mock ];
# missing pytest-freezegun package
checkPhase = ''
substituteInPlace pytest.ini --replace "--flake8" ""
pytest
pytest -k 'not get_nearest_year_for_day'
'';
meta = with lib; {

View File

@@ -61,7 +61,7 @@ let
bazelTarget = ":pip_pkg";
fetchAttrs = {
sha256 = "1snj7fxfxzvrqv9cpir1daxcg3fip6cvbk94y3mi2h50k3ni826i";
sha256 = "1bh6lsi0732fzhrfs6p33qg2qfvq73r6qmijbpnv592aq8yiy1h5";
};
buildAttrs = {

View File

@@ -0,0 +1,29 @@
{ lib
, isPy27
, fetchFromGitHub
, buildPythonPackage
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "tls-parser";
version = "1.2.2";
disabled = isPy27;
src = fetchFromGitHub {
owner = "nabla-c0d3";
repo = "tls_parser";
rev = version;
sha256 = "12qj3vg02r5a51w6gbgb1gcxicqc10lbbsdi57jkkfvbqiindbd0";
};
checkInputs = [ pytestCheckHook ];
meta = with lib; {
homepage = "https://github.com/nabla-c0d3/tls_parser";
description = "Small library to parse TLS records";
platforms = with platforms; linux ++ darwin;
license = licenses.mit;
maintainers = with maintainers; [ veehaitch ];
};
}