From 293f3d8ec5db5ceda882a71a959ec79194e6b588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 9 May 2022 02:07:25 +0200 Subject: [PATCH 1/5] python310Packages.argon2-cffi: normalise pname --- .../python-modules/{argon2_cffi => argon2-cffi}/default.nix | 5 ++--- pkgs/development/python-modules/django/4.nix | 4 ++-- .../python-modules/flask-security-too/default.nix | 4 ++-- pkgs/development/python-modules/jupyter_server/default.nix | 4 ++-- .../python-modules/keyrings-cryptfile/default.nix | 4 ++-- pkgs/development/python-modules/notebook/default.nix | 4 ++-- pkgs/development/python-modules/passlib/default.nix | 4 ++-- pkgs/development/python-modules/pykeepass/default.nix | 6 +++--- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) rename pkgs/development/python-modules/{argon2_cffi => argon2-cffi}/default.nix (91%) diff --git a/pkgs/development/python-modules/argon2_cffi/default.nix b/pkgs/development/python-modules/argon2-cffi/default.nix similarity index 91% rename from pkgs/development/python-modules/argon2_cffi/default.nix rename to pkgs/development/python-modules/argon2-cffi/default.nix index 4ecf5fbc5f0d..ed79243a6bd1 100644 --- a/pkgs/development/python-modules/argon2_cffi/default.nix +++ b/pkgs/development/python-modules/argon2-cffi/default.nix @@ -13,13 +13,12 @@ }: buildPythonPackage rec { - pname = "argon2_cffi"; + pname = "argon2-cffi"; version = "21.3.0"; format = "flit"; src = fetchPypi { - pname = "argon2-cffi"; - inherit version; + inherit pname version; sha256 = "d384164d944190a7dd7ef22c6aa3ff197da12962bd04b17f64d4e93d934dba5b"; }; diff --git a/pkgs/development/python-modules/django/4.nix b/pkgs/development/python-modules/django/4.nix index f36c064a6475..924ece59feab 100644 --- a/pkgs/development/python-modules/django/4.nix +++ b/pkgs/development/python-modules/django/4.nix @@ -17,7 +17,7 @@ # tests , aiosmtpd -, argon2_cffi +, argon2-cffi , bcrypt , docutils , geoip2 @@ -70,7 +70,7 @@ buildPythonPackage rec { checkInputs = [ aiosmtpd - argon2_cffi + argon2-cffi asgiref bcrypt docutils diff --git a/pkgs/development/python-modules/flask-security-too/default.nix b/pkgs/development/python-modules/flask-security-too/default.nix index c3d98e405f3c..70a6b6e1d6b9 100644 --- a/pkgs/development/python-modules/flask-security-too/default.nix +++ b/pkgs/development/python-modules/flask-security-too/default.nix @@ -32,7 +32,7 @@ , passlib # tests -, argon2_cffi +, argon2-cffi , flask-mongoengine , mongoengine , mongomock @@ -86,7 +86,7 @@ buildPythonPackage rec { }; checkInputs = [ - argon2_cffi + argon2-cffi flask-mongoengine mongoengine mongomock diff --git a/pkgs/development/python-modules/jupyter_server/default.nix b/pkgs/development/python-modules/jupyter_server/default.nix index dd8368676d1b..0001dd5e9373 100644 --- a/pkgs/development/python-modules/jupyter_server/default.nix +++ b/pkgs/development/python-modules/jupyter_server/default.nix @@ -6,7 +6,7 @@ , pythonOlder , pytestCheckHook , pytest-tornasync -, argon2_cffi +, argon2-cffi , jinja2 , tornado , pyzmq @@ -44,7 +44,7 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ - argon2_cffi + argon2-cffi jinja2 tornado pyzmq diff --git a/pkgs/development/python-modules/keyrings-cryptfile/default.nix b/pkgs/development/python-modules/keyrings-cryptfile/default.nix index 7f2cacea6294..23b8b66ea9fa 100644 --- a/pkgs/development/python-modules/keyrings-cryptfile/default.nix +++ b/pkgs/development/python-modules/keyrings-cryptfile/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchPypi , fetchpatch -, argon2_cffi +, argon2-cffi , keyring , pycryptodome , pytestCheckHook @@ -32,7 +32,7 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ - argon2_cffi + argon2-cffi keyring pycryptodome ]; diff --git a/pkgs/development/python-modules/notebook/default.nix b/pkgs/development/python-modules/notebook/default.nix index 3ead3cf4fe20..d76909efdcfe 100644 --- a/pkgs/development/python-modules/notebook/default.nix +++ b/pkgs/development/python-modules/notebook/default.nix @@ -2,7 +2,7 @@ , lib , buildPythonPackage , fetchPypi -, argon2_cffi +, argon2-cffi , nose , nose_warnings_filters , glibcLocales @@ -43,7 +43,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ jinja2 tornado ipython_genutils traitlets jupyter_core send2trash jupyter-client nbformat nbconvert ipykernel terminado requests pexpect - prometheus-client argon2_cffi + prometheus-client argon2-cffi ]; # disable warning_filters diff --git a/pkgs/development/python-modules/passlib/default.nix b/pkgs/development/python-modules/passlib/default.nix index 9e35fb8f76a7..8fd7b177a27c 100644 --- a/pkgs/development/python-modules/passlib/default.nix +++ b/pkgs/development/python-modules/passlib/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , fetchPypi -, argon2_cffi +, argon2-cffi , bcrypt , cryptography , pytestCheckHook @@ -17,7 +17,7 @@ buildPythonPackage rec { }; passthru.extras-require = { - argon2 = [ argon2_cffi ]; + argon2 = [ argon2-cffi ]; bcrypt = [ bcrypt ]; totp = [ cryptography ]; }; diff --git a/pkgs/development/python-modules/pykeepass/default.nix b/pkgs/development/python-modules/pykeepass/default.nix index cb893c98ac92..27470b66a624 100644 --- a/pkgs/development/python-modules/pykeepass/default.nix +++ b/pkgs/development/python-modules/pykeepass/default.nix @@ -1,6 +1,6 @@ { lib, fetchFromGitHub, buildPythonPackage , lxml, pycryptodomex, construct -, argon2_cffi, python-dateutil, future +, argon2-cffi, python-dateutil, future , python }: @@ -21,10 +21,10 @@ buildPythonPackage rec { propagatedBuildInputs = [ lxml pycryptodomex construct - argon2_cffi python-dateutil future + argon2-cffi python-dateutil future ]; - propagatedNativeBuildInputs = [ argon2_cffi ]; + propagatedNativeBuildInputs = [ argon2-cffi ]; checkPhase = '' ${python.interpreter} -m unittest tests.tests diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index a24a8e2c98fb..d76d079eab29 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -36,6 +36,7 @@ mapAliases ({ aioh2 = throw "aioh2 has been removed because it is abandoned and broken."; # Added 2022-03-30 ansible-base = throw "ansible-base has been removed, because it is end of life"; # added 2022-03-30 anyjson = throw "anyjson has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-01-18 + argon2_cffi = argon2-cffi; # added 2022-05-09 asyncio-nats-client = nats-py; # added 2022-02-08 bitcoin-price-api = throw "bitcoin-price-api has been removed, it was using setuptools 2to3 translation feautre, which has been removed in setuptools 58"; # added 2022-02-15 blockdiagcontrib-cisco = throw "blockdiagcontrib-cisco is not compatible with blockdiag 2.0.0 and has been removed."; # added 2020-11-29 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f3c6b11d4a69..6b5ce3f8ba42 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -626,7 +626,7 @@ in { argh = callPackage ../development/python-modules/argh { }; - argon2_cffi = callPackage ../development/python-modules/argon2_cffi { }; + argon2-cffi = callPackage ../development/python-modules/argon2-cffi { }; argon2-cffi-bindings = callPackage ../development/python-modules/argon2-cffi-bindings { }; From 03ebf37be754073601817f78993c178275546013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 9 May 2022 02:02:36 +0200 Subject: [PATCH 2/5] python310Packages.autobahn: adopt, populate passthru.extras-require --- .../python-modules/autobahn/default.nix | 64 +++++++++++++------ 1 file changed, 46 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/autobahn/default.nix b/pkgs/development/python-modules/autobahn/default.nix index 49f18ebca498..ff866c6364ca 100644 --- a/pkgs/development/python-modules/autobahn/default.nix +++ b/pkgs/development/python-modules/autobahn/default.nix @@ -1,25 +1,49 @@ { lib -, argon2_cffi , buildPythonPackage -, cbor +, fetchPypi +, attrs +, argon2-cffi +, base58 , cbor2 , cffi +, click , cryptography -, fetchPypi +, ecdsa + # , eth-abi , flatbuffers +, jinja2 +, hkdf +, hyperlink +, mnemonic , mock , msgpack , passlib + # , py-ecc + # , py-eth-sig-utils +, py-multihash +, py-ubjson , pynacl +, pygobject3 +, pyopenssl +, pyqrcode , pytest-asyncio +, python-snappy , pytestCheckHook , pythonOlder + # , pytrie +, rlp +, service-identity +, spake2 , twisted -, py-ubjson , txaio , ujson + # , web3 + # , wsaccel + # , xbr +, yapf + # , zlmdb , zope_interface -}: +}@args: buildPythonPackage rec { pname = "autobahn"; @@ -34,27 +58,18 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - argon2_cffi - cbor - cbor2 - cffi cryptography - flatbuffers - msgpack - passlib - py-ubjson + hyperlink pynacl - twisted txaio - ujson - zope_interface ]; checkInputs = [ mock pytest-asyncio pytestCheckHook - ]; + ] ++ passthru.extras-require.scram + ++ passthru.extras-require.serialization; postPatch = '' substituteInPlace setup.py \ @@ -74,10 +89,23 @@ buildPythonPackage rec { "autobahn" ]; + passthru.extras-require = rec { + all = accelerate ++ compress ++ encryption ++ nvx ++ serialization ++ scram ++ twisted ++ ui ++ xbr; + accelerate = [ /* wsaccel */ ]; + compress = [ python-snappy ]; + encryption = [ pynacl pyopenssl pyqrcode /* pytrie */ service-identity ]; + nvx = [ cffi ]; + scram = [ argon2-cffi cffi passlib ]; + serialization = [ cbor2 flatbuffers msgpack ujson py-ubjson ]; + twisted = [ attrs args.twisted zope_interface ]; + ui = [ pygobject3 ]; + xbr = [ base58 cbor2 click ecdsa /* eth-abi */ jinja2 hkdf mnemonic /* py-ecc py-eth-sig-utils */ py-multihash rlp spake2 twisted /* web3 xbr */ yapf /* zlmdb */ ]; + }; + meta = with lib; { description = "WebSocket and WAMP in Python for Twisted and asyncio"; homepage = "https://crossbar.io/autobahn"; license = licenses.mit; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ SuperSandro2000 ]; }; } From 281ebacfa99e4405af050281d67f8e1da5a3dbee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 9 May 2022 03:39:11 +0200 Subject: [PATCH 3/5] python310Packages.magic-wormhole-mailbox-server: adopt, fix requirements, run tests with trial --- .../magic-wormhole-mailbox-server/default.nix | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix b/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix index dfd16c04a6f8..77870ed68365 100644 --- a/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix +++ b/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix @@ -1,4 +1,15 @@ -{ lib, buildPythonPackage, fetchPypi, isPy27, six, attrs, twisted, pyopenssl, service-identity, autobahn, treq, mock, pytest }: +{ lib +, buildPythonPackage +, fetchPypi +, six +, attrs +, twisted +, pyopenssl +, service-identity +, autobahn +, treq +, mock +}: buildPythonPackage rec { version = "0.4.1"; @@ -9,18 +20,27 @@ buildPythonPackage rec { sha256 = "1af10592909caaf519c00e706eac842c5e77f8d4356215fe9c61c7b2258a88fb"; }; - propagatedBuildInputs = [ six attrs twisted pyopenssl service-identity autobahn ]; + propagatedBuildInputs = [ + attrs + six + twisted + autobahn + ] ++ autobahn.extras-require.twisted + ++ twisted.extras-require.tls; - # zope.interface import issue - doCheck = !isPy27; - checkInputs = [ treq mock pytest ]; + checkInputs = [ + treq + mock + twisted + ]; checkPhase = '' - pytest + trial -j$NIX_BUILD_CORES wormhole_mailbox_server ''; meta = with lib; { description = "Securely transfer data between computers"; homepage = "https://github.com/warner/magic-wormhole-mailbox-server"; license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; }; } From 64c7e7e3c59b6ac7e8b26283e9f3e5d9b98b72f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 9 May 2022 03:39:29 +0200 Subject: [PATCH 4/5] python310Packages.magic-wormhole-transit-relay: adopt, fix dependencies, run tests with trial --- .../magic-wormhole-transit-relay/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/magic-wormhole-transit-relay/default.nix b/pkgs/development/python-modules/magic-wormhole-transit-relay/default.nix index 2d6a8d969d8b..a618be999c0b 100644 --- a/pkgs/development/python-modules/magic-wormhole-transit-relay/default.nix +++ b/pkgs/development/python-modules/magic-wormhole-transit-relay/default.nix @@ -1,4 +1,10 @@ -{ lib, buildPythonPackage, fetchPypi, twisted, mock }: +{ lib +, buildPythonPackage +, fetchPypi +, autobahn +, mock +, twisted +}: buildPythonPackage rec { pname = "magic-wormhole-transit-relay"; @@ -9,17 +15,18 @@ buildPythonPackage rec { sha256 = "0ppsx2s1ysikns1h053x67z2zmficbn3y3kf52bzzslhd2s02j6b"; }; - propagatedBuildInputs = [ twisted ]; + propagatedBuildInputs = [ autobahn twisted ]; - checkInputs = [ mock ]; + checkInputs = [ mock twisted ]; checkPhase = '' - ${twisted}/bin/trial wormhole_transit_relay + trial -j$NIX_BUILD_CORES wormhole_transit_relay ''; meta = with lib; { description = "Transit Relay server for Magic-Wormhole"; - homepage = "https://github.com/warner/magic-wormhole-transit-relay"; + homepage = "https://github.com/magic-wormhole/magic-wormhole-transit-relay"; license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; }; } From 9d976822edfe7935848da53a9d915fac434f1975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 9 May 2022 03:43:25 +0200 Subject: [PATCH 5/5] python310Packages.magic-wormhole: adopt, fix dependencies, run tests with trial --- .../python-modules/magic-wormhole/default.nix | 43 +++++++++++++------ 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/magic-wormhole/default.nix b/pkgs/development/python-modules/magic-wormhole/default.nix index abb9a04eaa48..c6450c3cecb9 100644 --- a/pkgs/development/python-modules/magic-wormhole/default.nix +++ b/pkgs/development/python-modules/magic-wormhole/default.nix @@ -1,7 +1,7 @@ -{ lib, stdenv +{ lib +, stdenv , buildPythonPackage , fetchPypi -, isPy27 , spake2 , pynacl , six @@ -15,7 +15,6 @@ , humanize , txtorcon , nettools -, glibcLocales , mock , magic-wormhole-transit-relay , magic-wormhole-mailbox-server @@ -30,9 +29,28 @@ buildPythonPackage rec { sha256 = "0q41j99718y7m95zg1vaybnsp31lp6lhyqkbv4yqz5ys6jixh3qv"; }; - buildInputs = [ glibcLocales ]; - propagatedBuildInputs = [ spake2 pynacl six attrs twisted autobahn automat hkdf tqdm click humanize txtorcon ]; - checkInputs = [ mock magic-wormhole-transit-relay magic-wormhole-mailbox-server ]; + propagatedBuildInputs = [ + spake2 + pynacl + six + attrs + twisted + autobahn + automat + hkdf + tqdm + click + humanize + txtorcon + ] ++ autobahn.extras-require.twisted + ++ twisted.extras-require.tls; + + checkInputs = [ + mock + magic-wormhole-transit-relay + magic-wormhole-mailbox-server + twisted + ]; postPatch = lib.optionalString stdenv.isLinux '' sed -i -e "s|'ifconfig'|'${nettools}/bin/ifconfig'|" src/wormhole/ipaddrs.py @@ -42,9 +60,7 @@ buildPythonPackage rec { install -Dm644 docs/wormhole.1 $out/share/man/man1/wormhole.1 ''; - # zope.interface issue - doCheck = !isPy27; - preCheck = '' + checkPhase = '' export PATH=$out/bin:$PATH export LANG="en_US.UTF-8" export LC_ALL="en_US.UTF-8" @@ -52,16 +68,15 @@ buildPythonPackage rec { --replace 'getProcessOutputAndValue("locale", ["-a"])' 'getProcessOutputAndValue("locale", ["-a"], env=os.environ)' \ --replace 'if (os.path.dirname(os.path.abspath(wormhole))' 'if not os.path.abspath(wormhole).startswith("/nix/store") and (os.path.dirname(os.path.abspath(wormhole))' \ --replace 'locale_env = dict(LC_ALL=locale, LANG=locale)' 'locale_env = dict(LC_ALL=locale, LANG=locale, LOCALE_ARCHIVE=os.getenv("LOCALE_ARCHIVE"))' + + trial -j$NIX_BUILD_CORES wormhole ''; meta = with lib; { description = "Securely transfer data between computers"; - homepage = "https://github.com/warner/magic-wormhole"; + homepage = "https://github.com/magic-wormhole/magic-wormhole"; license = licenses.mit; - # Currently broken on Python 2.7. See - # https://github.com/NixOS/nixpkgs/issues/71826 - broken = isPy27; - maintainers = with maintainers; [ asymmetric ]; + maintainers = with maintainers; [ asymmetric SuperSandro2000 ]; mainProgram = "wormhole"; }; }