Merge remote-tracking branch 'origin/staging-next' into staging

This commit is contained in:
Martin Weinelt
2022-06-08 22:22:26 +02:00
250 changed files with 4678 additions and 3993 deletions
@@ -1,28 +0,0 @@
{ lib, buildPythonPackage, fetchPypi, locale, pytestCheckHook }:
buildPythonPackage rec {
pname = "click";
version = "7.1.2";
src = fetchPypi {
inherit pname version;
sha256 = "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a";
};
postPatch = ''
substituteInPlace src/click/_unicodefun.py \
--replace "'locale'" "'${locale}/bin/locale'"
'';
checkInputs = [ pytestCheckHook ];
meta = with lib; {
homepage = "https://click.palletsprojects.com/";
description = "Create beautiful command line interfaces in Python";
longDescription = ''
A Python package for creating beautiful command line interfaces in a
composable way, with as little code as necessary.
'';
license = licenses.bsd3;
};
}
@@ -1,86 +0,0 @@
{ lib
, stdenv
, callPackage
, buildPythonPackage
, fetchPypi
, isPy27
, ipaddress
, openssl
, darwin
, packaging
, six
, isPyPy
, cffi
, pytest
, pretend
, iso8601
, pytz
, hypothesis
, enum34
}:
let
cryptography-vectors = callPackage ./vectors.nix { };
in
buildPythonPackage rec {
pname = "cryptography";
version = "3.3.2"; # Also update the hash in vectors-3.3.nix
src = fetchPypi {
inherit pname version;
sha256 = "1vcvw4lkw1spiq322pm1256kail8nck6bbgpdxx3pqa905wd6q2s";
};
patches = [ ./cryptography-py27-warning.patch ];
outputs = [ "out" "dev" ];
nativeBuildInputs = lib.optionals (!isPyPy) [
cffi
];
buildInputs = [ openssl ]
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
propagatedBuildInputs = [
packaging
six
] ++ lib.optionals (!isPyPy) [
cffi
] ++ lib.optionals isPy27 [
ipaddress
enum34
];
checkInputs = [
cryptography-vectors
hypothesis
iso8601
pretend
pytest
pytz
];
checkPhase = ''
py.test --disable-pytest-warnings tests
'';
# IOKit's dependencies are inconsistent between OSX versions, so this is the best we
# can do until nix 1.11's release
__impureHostDeps = [ "/usr/lib" ];
meta = with lib; {
description = "A package which provides cryptographic recipes and primitives";
longDescription = ''
Cryptography includes both high level recipes and low level interfaces to
common cryptographic algorithms such as symmetric ciphers, message
digests, and key derivation functions.
Our goal is for it to be your "cryptographic standard library". It
supports Python 2.7, Python 3.5+, and PyPy 5.4+.
'';
homepage = "https://github.com/pyca/cryptography";
changelog = "https://cryptography.io/en/latest/changelog/#v"
+ replaceStrings [ "." ] [ "-" ] version;
license = with licenses; [ asl20 bsd3 psfl ];
maintainers = with maintainers; [ primeos ];
};
}
@@ -1,24 +0,0 @@
{ buildPythonPackage, fetchPypi, lib, cryptography }:
buildPythonPackage rec {
pname = "cryptography-vectors";
# The test vectors must have the same version as the cryptography package:
version = cryptography.version;
src = fetchPypi {
pname = "cryptography_vectors";
inherit version;
sha256 = "1yhaps0f3h2yjb6lmz953z1l1d84y9swk4k3gj9nqyk4vbx5m7cc";
};
# No tests included
doCheck = false;
meta = with lib; {
description = "Test vectors for the cryptography package";
homepage = "https://cryptography.io/en/latest/development/test-vectors/";
# Source: https://github.com/pyca/cryptography/tree/master/vectors;
license = with licenses; [ asl20 bsd3 ];
maintainers = with maintainers; [ primeos ];
};
}
@@ -1,21 +0,0 @@
{ lib
, buildPythonPackage
, fetchPypi
}:
buildPythonPackage rec {
pname = "decorator";
version = "4.4.2";
src = fetchPypi {
inherit pname version;
sha256 = "1rxzhk5zwiggk45hl53zydvy70lk654kg0nc1p54090p402jz9p3";
};
meta = with lib; {
homepage = "https://pypi.python.org/pypi/decorator";
description = "Better living through Python with decorators";
license = lib.licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}
@@ -1,28 +0,0 @@
{ lib, buildPythonPackage, fetchPypi
, itsdangerous, click, werkzeug, jinja2, pytest }:
buildPythonPackage rec {
version = "1.1.2";
pname = "Flask";
src = fetchPypi {
inherit pname version;
sha256 = "4efa1ae2d7c9865af48986de8aeb8504bf32c7f3d6fdc9353d34b21f4b127060";
};
checkInputs = [ pytest ];
propagatedBuildInputs = [ itsdangerous click werkzeug jinja2 ];
checkPhase = ''
py.test
'';
# Tests require extra dependencies
doCheck = false;
meta = with lib; {
homepage = "http://flask.pocoo.org/";
description = "A microframework based on Werkzeug, Jinja 2, and good intentions";
license = licenses.bsd3;
};
}
@@ -1,29 +0,0 @@
{ lib
, buildPythonPackage
, fetchPypi
, python-dateutil
, six
, mock
, nose
, pytest
}:
buildPythonPackage rec {
pname = "freezegun";
version = "0.3.15";
src = fetchPypi {
inherit pname version;
sha256 = "e2062f2c7f95cc276a834c22f1a17179467176b624cc6f936e8bc3be5535ad1b";
};
propagatedBuildInputs = [ python-dateutil six ];
checkInputs = [ mock nose pytest ];
meta = with lib; {
description = "FreezeGun: Let your Python tests travel through time";
homepage = "https://github.com/spulec/freezegun";
license = licenses.asl20;
};
}
@@ -1,23 +0,0 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPy3k
}:
buildPythonPackage rec {
pname = "ipaddr";
version = "2.2.0";
disabled = isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "1ml8r8z3f0mnn381qs1snbffa920i9ycp6mm2am1d3aqczkdz4j0";
};
meta = with lib; {
description = "Google's IP address manipulation library";
homepage = "https://github.com/google/ipaddr-py";
license = licenses.asl20;
};
}
@@ -1,21 +0,0 @@
{ lib
, buildPythonPackage
, fetchPypi
}:
buildPythonPackage rec {
pname = "itsdangerous";
version = "1.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19";
};
meta = with lib; {
description = "Helpers to pass trusted data to untrusted environments and back";
homepage = "https://pypi.python.org/pypi/itsdangerous/";
license = licenses.bsd0;
};
}
@@ -1,39 +0,0 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPy27
, mock
, pycrypto
, requests
, pytest-runner
, pytest
, requests-mock
, typing
, backports_ssl_match_hostname
}:
buildPythonPackage rec {
pname = "apache-libcloud";
version = "2.8.3";
src = fetchPypi {
inherit pname version;
sha256 = "70096690b24a7832cc5abdfda1954b49fddc1c09a348a1e6caa781ac867ed4c6";
};
checkInputs = [ mock pytest pytest-runner requests-mock ];
propagatedBuildInputs = [ pycrypto requests ]
++ lib.optionals isPy27 [ typing backports_ssl_match_hostname ];
preConfigure = "cp libcloud/test/secrets.py-dist libcloud/test/secrets.py";
# requires a certificates file
doCheck = false;
meta = with lib; {
description = "A unified interface to many cloud providers";
homepage = "https://libcloud.apache.org/";
license = licenses.asl20;
};
}
@@ -1,31 +0,0 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, lxml
, docutils
, pillow
, isPy3k
}:
buildPythonPackage {
version = "1.1.7";
pname = "python-lpod";
# lpod library currently does not support Python 3.x
disabled = isPy3k;
propagatedBuildInputs = [ lxml docutils pillow ];
src = fetchFromGitHub {
owner = "lpod";
repo = "lpod-python";
rev = "dee32120ee582ff337b0c52a95a9a87cca71fd67";
sha256 = "1mikvzp27wxkzpr2lii4wg1hhx8h610agckqynvsrdc8v3nw9ciw";
};
meta = with lib; {
homepage = "https://github.com/lpod/lpod-python/";
description = "Library implementing the ISO/IEC 26300 OpenDocument Format standard (ODF) ";
license = licenses.gpl3;
};
}
@@ -1,44 +0,0 @@
{ lib
, buildPythonPackage
, fetchPypi
, cryptography
, ecdsa
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "pyjwt";
version = "1.7.1";
src = fetchPypi {
pname = "PyJWT";
inherit version;
sha256 = "8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96";
};
postPatch = ''
sed -i '/^addopts/d' setup.cfg
'';
propagatedBuildInputs = [
cryptography
ecdsa
];
checkInputs = [
pytestCheckHook
];
disabledTests = [
"test_ec_verify_should_return_false_if_signature_invalid"
];
pythonImportsCheck = [ "jwt" ];
meta = with lib; {
description = "JSON Web Token implementation in Python";
homepage = "https://github.com/jpadilla/pyjwt";
license = licenses.mit;
};
}
@@ -1,81 +0,0 @@
{ lib
, brotli
, buildPythonPackage
, certifi
, cryptography
, python-dateutil
, fetchpatch
, fetchPypi
, idna
, mock
, pyopenssl
, pysocks
, pytest-freezegun
, pytest-timeout
, pytestCheckHook
, tornado
, trustme
}:
buildPythonPackage rec {
pname = "urllib3";
version = "1.26.2";
src = fetchPypi {
inherit pname version;
sha256 = "19188f96923873c92ccb987120ec4acaa12f0461fa9ce5d3d0772bc965a39e08";
};
patches = [
(fetchpatch {
name = "CVE-2021-28363.patch";
url = "https://github.com/urllib3/urllib3/commit/8d65ea1ecf6e2cdc27d42124e587c1b83a3118b0.patch";
sha256 = "1lqhrd11p03iv14bp89rh67ynf000swmwsfvr3jpfdycdqr3ka9q";
})
];
propagatedBuildInputs = [
brotli
certifi
cryptography
idna
pyopenssl
pysocks
];
checkInputs = [
python-dateutil
mock
pytest-freezegun
pytest-timeout
pytestCheckHook
tornado
trustme
];
# Tests in urllib3 are mostly timeout-based instead of event-based and
# are therefore inherently flaky. On your own machine, the tests will
# typically build fine, but on a loaded cluster such as Hydra random
# timeouts will occur.
#
# The urllib3 test suite has two different timeouts in their test suite
# (see `test/__init__.py`):
# - SHORT_TIMEOUT
# - LONG_TIMEOUT
# When CI is in the env, LONG_TIMEOUT will be significantly increased.
# Still, failures can occur and for that reason tests are disabled.
doCheck = false;
preCheck = ''
export CI # Increases LONG_TIMEOUT
'';
pythonImportsCheck = [ "urllib3" ];
meta = with lib; {
description = "Powerful, sanity-friendly HTTP client for Python";
homepage = "https://github.com/shazow/urllib3";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}
@@ -1,48 +0,0 @@
{ buildPythonPackage
, lib
, six
, fetchPypi
, pyyaml
, mock
, contextlib2
, wrapt
, pytest
, pytest-httpbin
, yarl
, pythonOlder
, pythonAtLeast
}:
buildPythonPackage rec {
pname = "vcrpy";
version = "3.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "21168d5ae14263a833d4b71acfd8278d8841114f24be1b4ab4a5719d0c7f07bc";
};
checkInputs = [
pytest
pytest-httpbin
];
propagatedBuildInputs = [
pyyaml
wrapt
six
]
++ lib.optionals (pythonOlder "3.3") [ contextlib2 mock ]
++ lib.optionals (pythonAtLeast "3.4") [ yarl ];
checkPhase = ''
py.test --ignore=tests/integration -k "not TestVCRConnection"
'';
meta = with lib; {
description = "Automatically mock your HTTP interactions to simplify and speed up testing";
homepage = "https://github.com/kevin1024/vcrpy";
license = licenses.mit;
};
}
@@ -1,60 +0,0 @@
{ lib, stdenv, buildPythonPackage, fetchPypi
, itsdangerous, hypothesis
, pytestCheckHook, requests
, pytest-timeout
}:
buildPythonPackage rec {
pname = "Werkzeug";
version = "1.0.1";
src = fetchPypi {
inherit pname version;
sha256 = "6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c";
};
propagatedBuildInputs = [ itsdangerous ];
checkInputs = [ pytestCheckHook requests hypothesis pytest-timeout ];
postPatch = ''
# ResourceWarning causes tests to fail
rm tests/test_routing.py
'';
disabledTests = [
"test_save_to_pathlib_dst"
"test_cookie_maxsize"
"test_cookie_samesite_attribute"
"test_cookie_samesite_invalid"
"test_range_parsing"
"test_content_range_parsing"
"test_http_date_lt_1000"
"test_best_match_works"
"test_date_to_unix"
"test_easteregg"
# Seems to be a problematic test-case:
#
# > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
# E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]>
# E
# E Traceback (most recent call last):
# E File "/nix/store/cwv8aj4vsqvimzljw5dxsxy663vjgibj-python3.9-Werkzeug-1.0.1/lib/python3.9/site-packages/werkzeug/formparser.py", line 318, in parse_multipart_headers
# E return Headers(result)
# E ResourceWarning: unclosed file <_io.FileIO name=11 mode='rb+' closefd=True>
"test_basic_routing"
"test_merge_slashes_match"
"test_merge_slashes_build"
"TestMultiPart"
"TestHTTPUtility"
] ++ lib.optionals stdenv.isDarwin [
"test_get_machine_id"
];
meta = with lib; {
homepage = "https://palletsprojects.com/p/werkzeug/";
description = "A WSGI utility library for Python";
license = licenses.bsd3;
maintainers = [ ];
};
}
@@ -1,25 +0,0 @@
{ lib, buildPythonPackage, fetchPypi, h11, enum34, pytest }:
buildPythonPackage rec {
pname = "wsproto";
version = "0.14.1";
src = fetchPypi {
inherit pname version;
sha256 = "051s127qb5dladxa14n9nqajwq7xki1dz1was5r5v9df5a0jq8pd";
};
propagatedBuildInputs = [ h11 enum34 ];
checkInputs = [ pytest ];
checkPhase = ''
py.test
'';
meta = with lib; {
description = "Pure Python, pure state-machine WebSocket implementation";
homepage = "https://github.com/python-hyper/wsproto/";
license = licenses.mit;
};
}
@@ -1,91 +0,0 @@
{ fetchurl
, lib
, stdenv
, darwin
, openglSupport ? true
, libX11
, wxGTK
, wxmac
, pkg-config
, buildPythonPackage
, pyopengl
, isPy3k
, isPyPy
, python
, cairo
, pango
}:
assert wxGTK.unicode;
buildPythonPackage rec {
pname = "wxPython";
version = "3.0.2.0";
disabled = isPy3k || isPyPy;
doCheck = false;
src = fetchurl {
url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2";
sha256 = "0qfzx3sqx4mwxv99sfybhsij4b5pc03ricl73h4vhkzazgjjjhfm";
};
dontUseSetuptoolsBuild = true;
dontUsePipInstall = true;
hardeningDisable = [ "format" ];
nativeBuildInputs = [ pkg-config ]
++ (lib.optionals (!stdenv.isDarwin) [ wxGTK libX11 ])
++ (lib.optionals stdenv.isDarwin [ wxmac ]);
buildInputs = [ ]
++ (lib.optionals (!stdenv.isDarwin) [ (wxGTK.gtk) ])
++ (lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
ApplicationServices
AudioToolbox
CFNetwork
Carbon
Cocoa
CoreGraphics
CoreServices
CoreText
DiskArbitration
IOKit
ImageIO
OpenGL
Security
]))
++ (lib.optional openglSupport pyopengl);
preConfigure = ''
cd wxPython
# remove wxPython's darwin hack that interference with python-2.7-distutils-C++.patch
substituteInPlace config.py \
--replace "distutils.unixccompiler.UnixCCompiler = MyUnixCCompiler" ""
# set the WXPREFIX to $out instead of the storepath of wxwidgets
substituteInPlace config.py \
--replace "WXPREFIX = getWxConfigValue('--prefix')" "WXPREFIX = '$out'"
# this check is supposed to only return false on older systems running non-framework python
substituteInPlace src/osx_cocoa/_core_wrap.cpp \
--replace "return wxPyTestDisplayAvailable();" "return true;"
'' + lib.optionalString (!stdenv.isDarwin) ''
substituteInPlace wx/lib/wxcairo.py \
--replace 'cairoLib = None' 'cairoLib = ctypes.CDLL("${cairo}/lib/libcairo.so")'
substituteInPlace wx/lib/wxcairo.py \
--replace '_dlls = dict()' '_dlls = {k: ctypes.CDLL(v) for k, v in [
("gdk", "${wxGTK.gtk}/lib/libgtk-x11-2.0.so"),
("pangocairo", "${pango.out}/lib/libpangocairo-1.0.so"),
("appsvc", None)
]}'
'';
buildPhase = "";
installPhase = ''
${python.interpreter} setup.py install WXPORT=${if stdenv.isDarwin then "osx_cocoa" else "gtk2"} NO_HEADERS=0 BUILD_GLCANVAS=${if openglSupport then "1" else "0"} UNICODE=1 --prefix=$out
wrapPythonPrograms
'';
passthru = { inherit wxGTK openglSupport; };
}