From 4929c80451ec2132a074a6e075a42efd3a2b2ddf Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Sat, 14 May 2022 17:15:21 +0200 Subject: [PATCH 01/29] pe-parse: drop `no-sign-conversion` compile flag Upstream has merged a patch to fix the issue so we can use that instead of being lax when compiling. --- pkgs/development/libraries/pe-parse/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/pe-parse/default.nix b/pkgs/development/libraries/pe-parse/default.nix index c8689d15e24bd..d9ccb4447b2fd 100644 --- a/pkgs/development/libraries/pe-parse/default.nix +++ b/pkgs/development/libraries/pe-parse/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, cmake }: +{ stdenv, lib, fetchFromGitHub, cmake, fetchpatch }: stdenv.mkDerivation rec { pname = "pe-parse"; @@ -11,10 +11,14 @@ stdenv.mkDerivation rec { hash = "sha256-HwWlMRhpB/sa/JRyAZF7LZzkXCCyuxB+gtDAfHt7e6k="; }; - nativeBuildInputs = [ cmake ]; + patches = [ + (fetchpatch { + url = "https://github.com/trailofbits/pe-parse/commit/eecdb3d36eb44e306398a2e66e85490f9bdcc74c.patch"; + hash = "sha256-pd6D/JMctiQqJxnJU9Nm/GDVf4/CaIGeXx1UfdcCupo="; + }) + ]; - # See https://github.com/trailofbits/pe-parse/issues/169 - NIX_CFLAGS_COMPILE = "-Wno-sign-conversion"; + nativeBuildInputs = [ cmake ]; doInstallCheck = true; installCheckPhase = '' From 999b8268c87df8eb4f77e47c5f68f42ab06976d3 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Mon, 16 May 2022 17:04:14 -0400 Subject: [PATCH 02/29] gitea: 1.16.7 -> 1.16.8 --- pkgs/applications/version-management/gitea/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/gitea/default.nix b/pkgs/applications/version-management/gitea/default.nix index 6ad600e07ccb8..fbf0138ce5aa7 100644 --- a/pkgs/applications/version-management/gitea/default.nix +++ b/pkgs/applications/version-management/gitea/default.nix @@ -16,12 +16,12 @@ with lib; buildGoPackage rec { pname = "gitea"; - version = "1.16.7"; + version = "1.16.8"; # not fetching directly from the git repo, because that lacks several vendor files for the web UI src = fetchurl { url = "https://github.com/go-gitea/gitea/releases/download/v${version}/gitea-src-${version}.tar.gz"; - sha256 = "sha256-UVmbFtHC4W3WF+DptdHMMUoe8UE5TVgoM9QRuczSrEg="; + sha256 = "sha256-W/AbRfnEQfnTjXJ8wTKEFOTld4rFsBvJiXnYK8Ugoj0="; }; unpackPhase = '' From 3ef60b5ffcd57d7db5668bbf068f5bbd7d4e206d Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Wed, 18 May 2022 19:18:25 +0200 Subject: [PATCH 03/29] phpExtensions.grpc: init at 1.45.0 --- .../development/php-packages/grpc/default.nix | 20 +++++++++++++++++++ pkgs/top-level/php-packages.nix | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/development/php-packages/grpc/default.nix diff --git a/pkgs/development/php-packages/grpc/default.nix b/pkgs/development/php-packages/grpc/default.nix new file mode 100644 index 0000000000000..24be5b3a66256 --- /dev/null +++ b/pkgs/development/php-packages/grpc/default.nix @@ -0,0 +1,20 @@ +{ buildPecl, zlib, lib }: + +buildPecl { + pname = "grpc"; + + version = "1.45.0"; + sha256 = "sha256-SPnECBZ80sXfXYiVJjGfOsSxZBBZnasO9pPu9Q5klIg"; + + doCheck = true; + checkTarget = "test"; + + nativeBuildInputs = [ zlib ]; + + meta = with lib; { + description = "A high performance, open source, general RPC framework that puts mobile and HTTP/2 first."; + license = licenses.asl20; + homepage = "https://github.com/grpc/grpc/tree/master/src/php/ext/grpc"; + maintainers = teams.php.members; + }; +} diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index db47de7f19820..3637a7a4bcf16 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -212,6 +212,8 @@ lib.makeScope pkgs.newScope (self: with self; { gnupg = callPackage ../development/php-packages/gnupg { }; + grpc = callPackage ../development/php-packages/grpc { }; + igbinary = callPackage ../development/php-packages/igbinary { }; imagick = callPackage ../development/php-packages/imagick { }; From 6bca93ce6925a2d194af11d1d4da9ad89c5029ae Mon Sep 17 00:00:00 2001 From: Alvar Penning Date: Thu, 19 May 2022 22:37:02 +0200 Subject: [PATCH 04/29] platformio: 5.2.5 -> 6.0.1 --- pkgs/development/embedded/platformio/core.nix | 40 +++++++------------ .../embedded/platformio/default.nix | 4 +- .../use-local-spdx-license-list.patch | 2 +- 3 files changed, 18 insertions(+), 28 deletions(-) diff --git a/pkgs/development/embedded/platformio/core.nix b/pkgs/development/embedded/platformio/core.nix index c40f2f45f3128..f44ba4e95b8e7 100644 --- a/pkgs/development/embedded/platformio/core.nix +++ b/pkgs/development/embedded/platformio/core.nix @@ -9,32 +9,13 @@ let python = python3.override { packageOverrides = self: super: { - semantic-version = super.semantic-version.overridePythonAttrs (oldAttrs: rec { - version = "2.9.0"; - src = fetchPypi { - pname = "semantic_version"; - version = version; - sha256 = "1chjd8019wnwb5mnd4x4jw9f8nhzg0xnapsdznk0fpiyamrlixdb"; - }; - }); - starlette = super.starlette.overridePythonAttrs (oldAttrs: rec { - version = "0.18.0"; + version = "0.20.0"; src = fetchFromGitHub { owner = "encode"; repo = "starlette"; rev = version; - sha256 = "1dpj33cggjjvpd3qdf6hv04z5ckcn9f5dfn98p5a8hx262kgsr9p"; - }; - }); - - uvicorn = super.uvicorn.overridePythonAttrs (oldAttrs: rec { - version = "0.17.0"; - src = fetchFromGitHub { - owner = "encode"; - repo = "uvicorn"; - rev = version; - sha256 = "142x8skb1yfys6gndfaay2r240j56dkr006p49pw4y9i0v85kynp"; + sha256 = "sha256-bSgPjKqM262PSufz1LHwrdM+uU8xO55Mifv66HRN02Y="; }; }); }; @@ -75,6 +56,8 @@ with python.pkgs; buildPythonApplication rec { ]; pytestFlagsArray = (map (e: "--deselect tests/${e}") [ + "commands/pkg/test_exec.py::test_pkg_specified" + "commands/pkg/test_exec.py::test_unrecognized_options" "commands/test_ci.py::test_ci_boards" "commands/test_ci.py::test_ci_build_dir" "commands/test_ci.py::test_ci_keep_build_dir" @@ -84,6 +67,7 @@ with python.pkgs; buildPythonApplication rec { "commands/test_init.py::test_init_duplicated_boards" "commands/test_init.py::test_init_enable_auto_uploading" "commands/test_init.py::test_init_ide_atom" + "commands/test_init.py::test_init_ide_clion" "commands/test_init.py::test_init_ide_eclipse" "commands/test_init.py::test_init_ide_vscode" "commands/test_init.py::test_init_incorrect_board" @@ -112,9 +96,6 @@ with python.pkgs; buildPythonApplication rec { "commands/test_lib_complex.py::test_lib_show" "commands/test_lib_complex.py::test_lib_stats" "commands/test_lib_complex.py::test_search" - "commands/test_test.py::test_local_env" - "commands/test_test.py::test_multiple_env_build" - "commands/test_test.py::test_setup_teardown_are_compilable" "package/test_manager.py::test_download" "package/test_manager.py::test_install_force" "package/test_manager.py::test_install_from_registry" @@ -132,12 +113,21 @@ with python.pkgs; buildPythonApplication rec { "test_misc.py::test_platformio_cli" "test_pkgmanifest.py::test_packages" ]) ++ (map (e: "--ignore=tests/${e}") [ + "commands/pkg/test_install.py" + "commands/pkg/test_list.py" + "commands/pkg/test_outdated.py" + "commands/pkg/test_search.py" + "commands/pkg/test_show.py" + "commands/pkg/test_uninstall.py" + "commands/pkg/test_update.py" "commands/test_boards.py" "commands/test_check.py" "commands/test_platform.py" + "commands/test_run.py" + "commands/test_test.py" "commands/test_update.py" - "test_maintenance.py" "test_ino2cpp.py" + "test_maintenance.py" ]) ++ [ "tests" ]; diff --git a/pkgs/development/embedded/platformio/default.nix b/pkgs/development/embedded/platformio/default.nix index 31b7b8d49518f..000c23898ff48 100644 --- a/pkgs/development/embedded/platformio/default.nix +++ b/pkgs/development/embedded/platformio/default.nix @@ -4,14 +4,14 @@ let callPackage = newScope self; - version = "5.2.5"; + version = "6.0.1"; # pypi tarballs don't contain tests - https://github.com/platformio/platformio-core/issues/1964 src = fetchFromGitHub { owner = "platformio"; repo = "platformio-core"; rev = "v${version}"; - sha256 = "1x1jqprwzpb09ca953rqbh2jvizh7bz8yj30krphb6007bnjilwy"; + sha256 = "sha256-noLdQctAaMNmfuxI3iybHFx3Q9aTr3gZaUZ+/uO+fnA="; }; self = { diff --git a/pkgs/development/embedded/platformio/use-local-spdx-license-list.patch b/pkgs/development/embedded/platformio/use-local-spdx-license-list.patch index 342fb120a0f71..65fcbd39d6a1d 100644 --- a/pkgs/development/embedded/platformio/use-local-spdx-license-list.patch +++ b/pkgs/development/embedded/platformio/use-local-spdx-license-list.patch @@ -6,7 +6,7 @@ index 416dccfd..896c3649 100644 @staticmethod @memoized(expire="1h") def load_spdx_licenses(): -- version = "3.16" +- version = "3.17" - spdx_data_url = ( - "https://raw.githubusercontent.com/spdx/license-list-data/" - "v%s/json/licenses.json" % version From 4c7efec3b55f98c10b8d840423d51d40a2ec2434 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 22 May 2022 11:39:24 +0300 Subject: [PATCH 05/29] =?UTF-8?q?gopass:=201.14.1=20=E2=86=92=201.14.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/tools/security/gopass/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index 4e3926d7f0642..f283a911a62c6 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { pname = "gopass"; - version = "1.14.1"; + version = "1.14.2"; nativeBuildInputs = [ installShellFiles makeWrapper ]; @@ -21,10 +21,10 @@ buildGoModule rec { owner = "gopasspw"; repo = pname; rev = "v${version}"; - sha256 = "sha256-vdMOD6Zrl718jcntjEzOG+4Rr0aqhm0YidA0x3Gseqg="; + sha256 = "sha256-JhLFax0UR/AVl/736pdsAyyQF/555YmLWLnZrsLDjlA="; }; - vendorSha256 = "sha256-mdPAZrcdlq7R7DRIfuxf4PCpEJoJjzo/+TDKAVglk7A="; + vendorSha256 = "sha256-ESIlmY3SzmfWLqLxf62dOhAsHPOKc2YYSOhzpJCjvCQ="; subPackages = [ "." ]; @@ -57,7 +57,7 @@ buildGoModule rec { description = "The slightly more awesome Standard Unix Password Manager for Teams. Written in Go"; homepage = "https://www.gopass.pw/"; license = licenses.mit; - maintainers = with maintainers; [ rvolosatovs ]; + maintainers = with maintainers; [ rvolosatovs sikmir ]; changelog = "https://github.com/gopasspw/gopass/raw/v${version}/CHANGELOG.md"; longDescription = '' From 24241c7dedf37e4fb0560850849bb1e5cede8adc Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 22 May 2022 11:20:49 +0100 Subject: [PATCH 06/29] miranda: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: types.o:(.bss+0x11b0): multiple definition of `current_file'; y.tab.o:(.bss+0x70): first defined here --- pkgs/development/compilers/miranda/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/compilers/miranda/default.nix b/pkgs/development/compilers/miranda/default.nix index 7b29699f151da..332f3d83e263c 100644 --- a/pkgs/development/compilers/miranda/default.nix +++ b/pkgs/development/compilers/miranda/default.nix @@ -52,6 +52,11 @@ stdenv.mkDerivation rec { }) ]; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: types.o:(.bss+0x11b0): multiple definition of `current_file'; y.tab.o:(.bss+0x70): first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "CFLAGS=-O2" From b2e5c3a0a04b9660b5d5d8c428c4e53d729155cc Mon Sep 17 00:00:00 2001 From: ajs124 Date: Sun, 22 May 2022 13:00:45 +0200 Subject: [PATCH 07/29] mariadb_104: 10.4.24 -> 10.4.25 --- pkgs/servers/sql/mariadb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index b1c71f28a835a..aa7417d0ed64c 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -238,8 +238,8 @@ in stdenv.mkDerivation (common // { in { mariadb_104 = mariadbPackage { # Supported until 2024-06-18 - version = "10.4.24"; - sha256 = "0ipqilri8isn0mfvwg8imwf36zm3jsw0wf2yx905c2bznd8mb5zy"; + version = "10.4.25"; + sha256 = "1y3ym8pb0pyra3dwy8sbzc4656c4y7g1savgyrsvf1mw2573r5pz"; }; mariadb_105 = mariadbPackage { # Supported until 2025-06-24 From ad2251525f6e4b9dc5892a98235523e22a38cb5d Mon Sep 17 00:00:00 2001 From: ajs124 Date: Sun, 22 May 2022 13:00:59 +0200 Subject: [PATCH 08/29] mariadb_105: 10.5.15 -> 10.5.16 --- pkgs/servers/sql/mariadb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index aa7417d0ed64c..1ca6c70113ed3 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -243,8 +243,8 @@ in { }; mariadb_105 = mariadbPackage { # Supported until 2025-06-24 - version = "10.5.15"; - sha256 = "0nfvyxb157qsbl0d1i5gfzr2hb1nm0iv58f7qcbk5kkhz0vyv049"; + version = "10.5.16"; + sha256 = "19nj7ilk1aqs9zvvzhx4619pgfqjp7ac90ffr3fdaw4viljqfgn1"; }; mariadb_106 = mariadbPackage { # Supported until 2026-07 From 4d0a7e47047c610b4924936ad74d4e3133ac49ce Mon Sep 17 00:00:00 2001 From: ajs124 Date: Sun, 22 May 2022 13:01:11 +0200 Subject: [PATCH 09/29] mariadb_106: 10.6.7 -> 10.6.8 --- pkgs/servers/sql/mariadb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 1ca6c70113ed3..2520c9a1fbaf2 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -248,8 +248,8 @@ in { }; mariadb_106 = mariadbPackage { # Supported until 2026-07 - version = "10.6.7"; - sha256 = "1idjnkjfkjvyr6r899xbiwq9wwbs84cm85mbc725yxjshqghzvkm"; + version = "10.6.8"; + sha256 = "0f6lkvv0dbq64y7zpks7nvhy1n08gad0i0dp0s2zpgfcb62liaap"; }; mariadb_107 = mariadbPackage { # Supported until 2023-02 From 0b100ea34378e80f4594e68421d736fb429ca790 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Sun, 22 May 2022 13:01:23 +0200 Subject: [PATCH 10/29] mariadb_107: 10.7.3 -> 10.7.4 --- pkgs/servers/sql/mariadb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 2520c9a1fbaf2..7b7bdaf82360a 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -253,8 +253,8 @@ in { }; mariadb_107 = mariadbPackage { # Supported until 2023-02 - version = "10.7.3"; - sha256 = "1m2wa67vvdm61ap8spl18b9vqkmsnq4rfd0248l17jf9zwcnja6s"; + version = "10.7.4"; + sha256 = "0ws17azsw3f26pkphjkyxmmi9qbv9gwidvz0ll6g482m6afrrpbk"; }; mariadb_108 = mariadbPackage { # Supported until 2023-05 From 58aae887506864ef0108fedb1bee34716096c6a8 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Sun, 22 May 2022 13:01:32 +0200 Subject: [PATCH 11/29] mariadb_108: 10.8.2 -> 10.8.3 --- pkgs/servers/sql/mariadb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 7b7bdaf82360a..50989a42e3e3f 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -258,7 +258,7 @@ in { }; mariadb_108 = mariadbPackage { # Supported until 2023-05 - version = "10.8.2"; - sha256 = "0v4mms3mihylnqlc0ifvwzykah6lkdd39lmxbv5vnhbsh7wggq0l"; + version = "10.8.3"; + sha256 = "14h80lfb9b3rv3fd8nkljbqhx6dmwjnqkz6c3ynixb3na72sszl8"; }; } From 710918b8fe20a087355b4a8a4241d6b9098319bd Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Fri, 20 May 2022 12:18:37 +0300 Subject: [PATCH 12/29] html-tidy: fix cross-compilation --- pkgs/tools/text/html-tidy/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/text/html-tidy/default.nix b/pkgs/tools/text/html-tidy/default.nix index 9694295ed1fa3..d80b8e8c899cd 100644 --- a/pkgs/tools/text/html-tidy/default.nix +++ b/pkgs/tools/text/html-tidy/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, libxslt }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, libxslt, html-tidy }: stdenv.mkDerivation rec { pname = "html-tidy"; @@ -11,9 +11,18 @@ stdenv.mkDerivation rec { sha256 = "sha256-ZMz0NySxzX2XHiqB8f5asvwjIG6kdIcq8Gb3EbAxBaU="; }; - nativeBuildInputs = [ cmake libxslt/*manpage*/ ]; + # https://github.com/htacg/tidy-html5/pull/1036 + patches = (fetchpatch { + url = "https://github.com/htacg/tidy-html5/commit/e9aa038bd06bd8197a0dc049380bc2945ff55b29.diff"; + sha256 = "sha256-Q2GjinNBWLL+HXUtslzDJ7CJSTflckbjweiSMCnIVwg="; + }); - cmakeFlags = []; + nativeBuildInputs = [ cmake libxslt/*manpage*/ ] + ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) html-tidy; + + cmakeFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "-DHOST_TIDY=tidy" + ]; # ATM bin/tidy is statically linked, as upstream provides no other option yet. # https://github.com/htacg/tidy-html5/issues/326#issuecomment-160322107 From 4e7ddc2c38a0038f5061f43c7b301a5dabf7c615 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 22 May 2022 13:37:33 +0100 Subject: [PATCH 13/29] difftastic: patch bundled mimalloc source to build on older macos same patch as introduced to our own mimalloc in 9ba8bda31328209bed6d4c0212735ff0e3c2cf95 --- pkgs/tools/text/difftastic/default.nix | 33 ++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/difftastic/default.nix b/pkgs/tools/text/difftastic/default.nix index 1c1d6fc6bfa0b..500aae3fc080c 100644 --- a/pkgs/tools/text/difftastic/default.nix +++ b/pkgs/tools/text/difftastic/default.nix @@ -1,4 +1,11 @@ -{ lib, fetchFromGitHub, rustPlatform, tree-sitter, difftastic, testers }: +{ lib +, fetchFromGitHub +, fetchpatch +, rustPlatform +, tree-sitter +, difftastic +, testers +}: rustPlatform.buildRustPackage rec { pname = "difftastic"; @@ -11,7 +18,29 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-jdkyDsuOOG1dJmgRmMp2KhY9ermccjrxK2JAIzpO6nw="; }; - cargoSha256 = "sha256-qHG3ve8HoMWBS/x6mRbXMsrpcqNqfVcbAkfYOk7Su/0="; + depsExtraArgs = { + postBuild = let + mimallocPatch = (fetchpatch { + name = "mimalloc-older-macos-fixes.patch"; + url = "https://github.com/microsoft/mimalloc/commit/40e0507a5959ee218f308d33aec212c3ebeef3bb.patch"; + stripLen = 1; + extraPrefix = "libmimalloc-sys/c_src/mimalloc/"; + sha256 = "1cqgay6ayzxsj8v1dy8405kwd8av34m4bjc84iyg9r52amlijbg4"; + }); + in '' + pushd $name + patch -p1 < ${mimallocPatch} + substituteInPlace libmimalloc-sys/.cargo-checksum.json \ + --replace \ + '6a2e9f0db0d3de160f9f15ddc8a870dbc42bba724f19f1e69b8c4952cb36821a' \ + '201ab8874d9ba863406e084888e492b785a7edae00a222f395c079028d21a89a' \ + --replace \ + 'a87a27e8432a63e5de25703ff5025588afd458e3a573e51b3c3dee2281bff0d4' \ + 'ab98a2da81d2145003a9cba7b7025efbd2c7b37c7a23c058c150705a3ec39298' + popd + ''; + }; + cargoSha256 = "12a12ng9wz2rrj3xzhgrqlg3lxpqxwdgvkz3fxny17nysmmpnhvv"; passthru.tests.version = testers.testVersion { package = difftastic; }; From 809ffd6cd33b0020c6ac0be57bf25f3da4c17d31 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 22 May 2022 16:27:48 +0200 Subject: [PATCH 14/29] doc/python: use optional-dependencies instead of extras-require This is the term that PEP 621 uses and it is less likely to be misspelled. https://peps.python.org/pep-0621/#dependencies-optional-dependencies I was never sure if it was `extra` or `extras`, or `require` or `requires` and finally committed a mistake in #167405. --- doc/languages-frameworks/python.section.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index fe28f94c069d3..9cb9d2ba7bfd7 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -982,12 +982,13 @@ in python.withPackages(ps: [ps.blaze])).env #### Optional extra dependencies Some packages define optional dependencies for additional features. With -`setuptools` this is called `extras_require` and `flit` calls it `extras-require`. A +`setuptools` this is called `extras_require` and `flit` calls it +`extras-require`, while PEP 621 calls these `optional-dependencies`. A method for supporting this is by declaring the extras of a package in its `passthru`, e.g. in case of the package `dask` ```nix -passthru.extras-require = { +passthru.optional-dependencies = { complete = [ distributed ]; }; ``` @@ -997,7 +998,7 @@ and letting the package requiring the extra add the list to its dependencies ```nix propagatedBuildInputs = [ ... -] ++ dask.extras-require.complete; +] ++ dask.optional-dependencies.complete; ``` Note this method is preferred over adding parameters to builders, as that can From 272430c82399d0a2f22b51dd0e564a8709ba6782 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 22 May 2022 16:26:11 +0200 Subject: [PATCH 15/29] treewide: migrate python packages to optional-dependencies This follows the term used by PEP 621. --- .../networking/syncplay/default.nix | 2 +- .../office/paperless-ngx/default.nix | 2 +- .../python-modules/Mako/default.nix | 4 ++-- .../python-modules/adb-shell/default.nix | 6 +++--- .../python-modules/androidtv/default.nix | 8 ++++---- .../python-modules/autobahn/default.nix | 6 +++--- .../python-modules/buildbot/default.nix | 2 +- .../python-modules/clize/default.nix | 2 +- .../python-modules/dask/default.nix | 2 +- .../python-modules/datashader/default.nix | 2 +- .../django_modelcluster/default.nix | 4 ++-- .../python-modules/fastapi/default.nix | 2 +- .../flask-security-too/default.nix | 10 +++++----- .../python-modules/httpcore/default.nix | 6 +++--- .../python-modules/httpx-socks/default.nix | 2 +- .../python-modules/httpx/default.nix | 8 ++++---- .../python-modules/ibis-framework/default.nix | 4 ++-- .../python-modules/ldaptor/default.nix | 2 +- .../magic-wormhole-mailbox-server/default.nix | 4 ++-- .../python-modules/magic-wormhole/default.nix | 4 ++-- .../python-modules/passlib/default.nix | 8 ++++---- .../python-modules/pure-python-adb/default.nix | 4 ++-- .../python-modules/pygatt/default.nix | 4 ++-- .../python-modules/python-barcode/default.nix | 4 ++-- .../python-modules/pytradfri/default.nix | 4 ++-- .../python-modules/rdflib/default.nix | 6 +++--- .../python-modules/redis/default.nix | 2 +- .../python-modules/relatorio/default.nix | 4 ++-- .../requests-aws4auth/default.nix | 4 ++-- .../python-modules/samsungctl/default.nix | 2 +- .../python-modules/samsungtvws/default.nix | 6 +++--- .../python-modules/treq/default.nix | 2 +- .../python-modules/trytond/default.nix | 6 +++--- .../python-modules/twisted/default.nix | 2 +- .../python-modules/txtorcon/default.nix | 2 +- .../python-modules/vivisect/default.nix | 4 ++-- .../python-modules/volvooncall/default.nix | 4 ++-- .../development/tools/devpi-server/default.nix | 2 +- .../home-assistant/component-packages.nix | 18 +++++++++--------- .../home-assistant/parse-requirements.py | 6 +++--- pkgs/servers/radicale/3.x.nix | 2 +- .../networking/p2p/tahoe-lafs/default.nix | 4 ++-- pkgs/tools/security/wapiti/default.nix | 4 ++-- 43 files changed, 93 insertions(+), 93 deletions(-) diff --git a/pkgs/applications/networking/syncplay/default.nix b/pkgs/applications/networking/syncplay/default.nix index 96420ff04de1c..1e88b12c74f9d 100644 --- a/pkgs/applications/networking/syncplay/default.nix +++ b/pkgs/applications/networking/syncplay/default.nix @@ -14,7 +14,7 @@ buildPythonApplication rec { }; propagatedBuildInputs = [ twisted certifi ] - ++ twisted.extras-require.tls + ++ twisted.optional-dependencies.tls ++ lib.optional enableGUI pyside2; nativeBuildInputs = lib.optionals enableGUI [ qt5.wrapQtAppsHook ]; diff --git a/pkgs/applications/office/paperless-ngx/default.nix b/pkgs/applications/office/paperless-ngx/default.nix index 17a1a56b769ae..358b66fb589a2 100644 --- a/pkgs/applications/office/paperless-ngx/default.nix +++ b/pkgs/applications/office/paperless-ngx/default.nix @@ -122,7 +122,7 @@ py.pkgs.pythonPackages.buildPythonApplication rec { threadpoolctl tika tqdm - twisted.extras-require.tls + twisted.optional-dependencies.tls txaio tzlocal urllib3 diff --git a/pkgs/development/python-modules/Mako/default.nix b/pkgs/development/python-modules/Mako/default.nix index 5eca80d98a519..a74f9988ad7aa 100644 --- a/pkgs/development/python-modules/Mako/default.nix +++ b/pkgs/development/python-modules/Mako/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { markupsafe ]; - passthru.extras-require = { + passthru.optional-dependencies = { babel = [ babel ]; @@ -39,7 +39,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook mock - ] ++ passthru.extras-require.babel; + ] ++ passthru.optional-dependencies.babel; disabledTests = lib.optionals isPyPy [ # https://github.com/sqlalchemy/mako/issues/315 diff --git a/pkgs/development/python-modules/adb-shell/default.nix b/pkgs/development/python-modules/adb-shell/default.nix index 792729da1fac9..bc10948f070fb 100644 --- a/pkgs/development/python-modules/adb-shell/default.nix +++ b/pkgs/development/python-modules/adb-shell/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { rsa ]; - passthru.extras-require = { + passthru.optional-dependencies = { async = [ aiofiles ]; @@ -47,8 +47,8 @@ buildPythonPackage rec { pycryptodome pytestCheckHook ] - ++ passthru.extras-require.async - ++ passthru.extras-require.usb; + ++ passthru.optional-dependencies.async + ++ passthru.optional-dependencies.usb; disabledTests = lib.optionals (pythonAtLeast "3.10") [ # Tests are failing with Python 3.10 diff --git a/pkgs/development/python-modules/androidtv/default.nix b/pkgs/development/python-modules/androidtv/default.nix index 2f7afc1137565..456186e45ab3e 100644 --- a/pkgs/development/python-modules/androidtv/default.nix +++ b/pkgs/development/python-modules/androidtv/default.nix @@ -28,19 +28,19 @@ buildPythonPackage rec { pure-python-adb ]; - passthru.extras-require = { + passthru.optional-dependencies = { async = [ aiofiles ]; - inherit (adb-shell.extras-require) usb; + inherit (adb-shell.optional-dependencies) usb; }; checkInputs = [ mock pytestCheckHook ] - ++ passthru.extras-require.async - ++ passthru.extras-require.usb; + ++ passthru.optional-dependencies.async + ++ passthru.optional-dependencies.usb; disabledTests = [ # Requires git but fails anyway diff --git a/pkgs/development/python-modules/autobahn/default.nix b/pkgs/development/python-modules/autobahn/default.nix index ff866c6364cab..5fd6f1a3b8f9d 100644 --- a/pkgs/development/python-modules/autobahn/default.nix +++ b/pkgs/development/python-modules/autobahn/default.nix @@ -68,8 +68,8 @@ buildPythonPackage rec { mock pytest-asyncio pytestCheckHook - ] ++ passthru.extras-require.scram - ++ passthru.extras-require.serialization; + ] ++ passthru.optional-dependencies.scram + ++ passthru.optional-dependencies.serialization; postPatch = '' substituteInPlace setup.py \ @@ -89,7 +89,7 @@ buildPythonPackage rec { "autobahn" ]; - passthru.extras-require = rec { + passthru.optional-dependencies = rec { all = accelerate ++ compress ++ encryption ++ nvx ++ serialization ++ scram ++ twisted ++ ui ++ xbr; accelerate = [ /* wsaccel */ ]; compress = [ python-snappy ]; diff --git a/pkgs/development/python-modules/buildbot/default.nix b/pkgs/development/python-modules/buildbot/default.nix index 6111772122716..f08c434406255 100644 --- a/pkgs/development/python-modules/buildbot/default.nix +++ b/pkgs/development/python-modules/buildbot/default.nix @@ -54,7 +54,7 @@ let pyyaml ] # tls - ++ twisted.extras-require.tls; + ++ twisted.optional-dependencies.tls; checkInputs = [ treq diff --git a/pkgs/development/python-modules/clize/default.nix b/pkgs/development/python-modules/clize/default.nix index 10b4c8f68c69a..1b0caeaaf266a 100644 --- a/pkgs/development/python-modules/clize/default.nix +++ b/pkgs/development/python-modules/clize/default.nix @@ -40,7 +40,7 @@ buildPythonPackage rec { six ]; - passthru.extras-require = { + passthru.optional-dependencies = { datetime = [ python-dateutil ]; diff --git a/pkgs/development/python-modules/dask/default.nix b/pkgs/development/python-modules/dask/default.nix index 79f07c6e88f22..59869efbffd8c 100644 --- a/pkgs/development/python-modules/dask/default.nix +++ b/pkgs/development/python-modules/dask/default.nix @@ -98,7 +98,7 @@ buildPythonPackage rec { "dask.diagnostics" ]; - passthru.extras-require = { + passthru.optional-dependencies = { complete = [ distributed ]; }; diff --git a/pkgs/development/python-modules/datashader/default.nix b/pkgs/development/python-modules/datashader/default.nix index b9630aa07fd4d..243571f248bb5 100644 --- a/pkgs/development/python-modules/datashader/default.nix +++ b/pkgs/development/python-modules/datashader/default.nix @@ -46,7 +46,7 @@ buildPythonPackage rec { param pyct scipy - ] ++ dask.extras-require.complete; + ] ++ dask.optional-dependencies.complete; checkInputs = [ pytestCheckHook diff --git a/pkgs/development/python-modules/django_modelcluster/default.nix b/pkgs/development/python-modules/django_modelcluster/default.nix index 02995c1570b9f..d59682de2f819 100644 --- a/pkgs/development/python-modules/django_modelcluster/default.nix +++ b/pkgs/development/python-modules/django_modelcluster/default.nix @@ -27,11 +27,11 @@ buildPythonPackage rec { pytz ]; - passthru.extras-require.taggit = [ + passthru.optional-dependencies.taggit = [ django-taggit ]; - checkInputs = passthru.extras-require.taggit; + checkInputs = passthru.optional-dependencies.taggit; checkPhase = '' runHook preCheck diff --git a/pkgs/development/python-modules/fastapi/default.nix b/pkgs/development/python-modules/fastapi/default.nix index 63071fd9e4469..3d418d75333f6 100644 --- a/pkgs/development/python-modules/fastapi/default.nix +++ b/pkgs/development/python-modules/fastapi/default.nix @@ -49,7 +49,7 @@ buildPythonPackage rec { pytest-asyncio sqlalchemy trio - ] ++ passlib.extras-require.bcrypt; + ] ++ passlib.optional-dependencies.bcrypt; patches = [ # Bump starlette, https://github.com/tiangolo/fastapi/pull/4483 diff --git a/pkgs/development/python-modules/flask-security-too/default.nix b/pkgs/development/python-modules/flask-security-too/default.nix index 789060ed2b5e4..eb9c01699e5b8 100644 --- a/pkgs/development/python-modules/flask-security-too/default.nix +++ b/pkgs/development/python-modules/flask-security-too/default.nix @@ -63,7 +63,7 @@ buildPythonPackage rec { passlib ]; - passthru.extras-require = { + passthru.optional-dependencies = { babel = [ babel flask-babel @@ -95,10 +95,10 @@ buildPythonPackage rec { pytestCheckHook zxcvbn ] - ++ passthru.extras-require.babel - ++ passthru.extras-require.common - ++ passthru.extras-require.fsqla - ++ passthru.extras-require.mfa; + ++ passthru.optional-dependencies.babel + ++ passthru.optional-dependencies.common + ++ passthru.optional-dependencies.fsqla + ++ passthru.optional-dependencies.mfa; pythonImportsCheck = [ "flask_security" ]; diff --git a/pkgs/development/python-modules/httpcore/default.nix b/pkgs/development/python-modules/httpcore/default.nix index 5b8d84ec30893..d2286b6b022b9 100644 --- a/pkgs/development/python-modules/httpcore/default.nix +++ b/pkgs/development/python-modules/httpcore/default.nix @@ -42,7 +42,7 @@ buildPythonPackage rec { sniffio ]; - passthru.extras-require = { + passthru.optional-dependencies = { http2 = [ h2 ]; socks = [ socksio ]; }; @@ -56,8 +56,8 @@ buildPythonPackage rec { trio trustme uvicorn - ] ++ passthru.extras-require.http2 - ++ passthru.extras-require.socks; + ] ++ passthru.optional-dependencies.http2 + ++ passthru.optional-dependencies.socks; pythonImportsCheck = [ "httpcore" ]; diff --git a/pkgs/development/python-modules/httpx-socks/default.nix b/pkgs/development/python-modules/httpx-socks/default.nix index 3bfbf2327f217..f8334593904c3 100644 --- a/pkgs/development/python-modules/httpx-socks/default.nix +++ b/pkgs/development/python-modules/httpx-socks/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { python-socks ]; - passthru.extras-require = { + passthru.optional-dependencies = { asyncio = [ async-timeout ]; trio = [ trio ]; }; diff --git a/pkgs/development/python-modules/httpx/default.nix b/pkgs/development/python-modules/httpx/default.nix index d75dbaa1c9bdb..0070d5d04eff5 100644 --- a/pkgs/development/python-modules/httpx/default.nix +++ b/pkgs/development/python-modules/httpx/default.nix @@ -49,7 +49,7 @@ buildPythonPackage rec { async_generator ]; - passthru.extras-require = { + passthru.optional-dependencies = { http2 = [ h2 ]; socks = [ socksio ]; brotli = if isPyPy then [ brotlicffi ] else [ brotli ]; @@ -63,9 +63,9 @@ buildPythonPackage rec { trustme typing-extensions uvicorn - ] ++ passthru.extras-require.http2 - ++ passthru.extras-require.brotli - ++ passthru.extras-require.socks; + ] ++ passthru.optional-dependencies.http2 + ++ passthru.optional-dependencies.brotli + ++ passthru.optional-dependencies.socks; postPatch = '' substituteInPlace setup.py \ diff --git a/pkgs/development/python-modules/ibis-framework/default.nix b/pkgs/development/python-modules/ibis-framework/default.nix index c5dfcc13e5c47..539238ba948d6 100644 --- a/pkgs/development/python-modules/ibis-framework/default.nix +++ b/pkgs/development/python-modules/ibis-framework/default.nix @@ -99,7 +99,7 @@ buildPythonPackage rec { pytest-mock pytest-randomly pytest-xdist - ] ++ lib.concatMap (name: passthru.extras-require.${name}) testBackends; + ] ++ lib.concatMap (name: passthru.optional-dependencies.${name}) testBackends; preBuild = '' # setup.py exists only for developer convenience and is automatically generated @@ -139,7 +139,7 @@ buildPythonPackage rec { ] ++ map (backend: "ibis.backends.${backend}") testBackends; passthru = { - extras-require = { + optional-dependencies = { clickhouse = [ clickhouse-cityhash clickhouse-driver lz4 ]; dask = [ dask pyarrow ]; datafusion = [ datafusion ]; diff --git a/pkgs/development/python-modules/ldaptor/default.nix b/pkgs/development/python-modules/ldaptor/default.nix index 55725fb49c9f8..f7b5e7cf96b86 100644 --- a/pkgs/development/python-modules/ldaptor/default.nix +++ b/pkgs/development/python-modules/ldaptor/default.nix @@ -27,7 +27,7 @@ buildPythonPackage rec { six twisted zope_interface - ] ++ twisted.extras-require.tls; + ] ++ twisted.optional-dependencies.tls; checkInputs = [ twisted 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 77870ed683656..4d000c7a1672f 100644 --- a/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix +++ b/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix @@ -25,8 +25,8 @@ buildPythonPackage rec { six twisted autobahn - ] ++ autobahn.extras-require.twisted - ++ twisted.extras-require.tls; + ] ++ autobahn.optional-dependencies.twisted + ++ twisted.optional-dependencies.tls; checkInputs = [ treq diff --git a/pkgs/development/python-modules/magic-wormhole/default.nix b/pkgs/development/python-modules/magic-wormhole/default.nix index c6450c3cecb9d..38e0b16726a87 100644 --- a/pkgs/development/python-modules/magic-wormhole/default.nix +++ b/pkgs/development/python-modules/magic-wormhole/default.nix @@ -42,8 +42,8 @@ buildPythonPackage rec { click humanize txtorcon - ] ++ autobahn.extras-require.twisted - ++ twisted.extras-require.tls; + ] ++ autobahn.optional-dependencies.twisted + ++ twisted.optional-dependencies.tls; checkInputs = [ mock diff --git a/pkgs/development/python-modules/passlib/default.nix b/pkgs/development/python-modules/passlib/default.nix index 8fd7b177a27c8..3a39f7ac7d58a 100644 --- a/pkgs/development/python-modules/passlib/default.nix +++ b/pkgs/development/python-modules/passlib/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { sha256 = "defd50f72b65c5402ab2c573830a6978e5f202ad0d984793c8dde2c4152ebe04"; }; - passthru.extras-require = { + passthru.optional-dependencies = { argon2 = [ argon2-cffi ]; bcrypt = [ bcrypt ]; totp = [ cryptography ]; @@ -24,9 +24,9 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook - ] ++ passthru.extras-require.argon2 - ++ passthru.extras-require.bcrypt - ++ passthru.extras-require.totp; + ] ++ passthru.optional-dependencies.argon2 + ++ passthru.optional-dependencies.bcrypt + ++ passthru.optional-dependencies.totp; meta = with lib; { description = "A password hashing library for Python"; diff --git a/pkgs/development/python-modules/pure-python-adb/default.nix b/pkgs/development/python-modules/pure-python-adb/default.nix index cb054feaf10f1..512c38b730d3e 100644 --- a/pkgs/development/python-modules/pure-python-adb/default.nix +++ b/pkgs/development/python-modules/pure-python-adb/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { sha256 = "0kdr7w2fhgjpcf1k3l6an9im583iqkr6v8hb4q1zw30nh3bqkk0f"; }; - passthru.extras-require = { + passthru.optional-dependencies = { async = [ aiofiles ]; @@ -28,7 +28,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ] - ++ passthru.extras-require.async; + ++ passthru.optional-dependencies.async; pythonImportsCheck = [ "ppadb.client" diff --git a/pkgs/development/python-modules/pygatt/default.nix b/pkgs/development/python-modules/pygatt/default.nix index 8d6f67a4c7514..fab5c093c5028 100644 --- a/pkgs/development/python-modules/pygatt/default.nix +++ b/pkgs/development/python-modules/pygatt/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { pyserial ]; - passthru.extras-require.GATTTOOL = [ + passthru.optional-dependencies.GATTTOOL = [ pexpect ]; @@ -34,7 +34,7 @@ buildPythonPackage rec { nose pytestCheckHook ] - ++ passthru.extras-require.GATTTOOL; + ++ passthru.optional-dependencies.GATTTOOL; postPatch = '' # Not support for Python < 3.4 diff --git a/pkgs/development/python-modules/python-barcode/default.nix b/pkgs/development/python-modules/python-barcode/default.nix index 165cb5cc5d27f..5d64f933b6910 100644 --- a/pkgs/development/python-modules/python-barcode/default.nix +++ b/pkgs/development/python-modules/python-barcode/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { setuptools-scm ]; - passthru.extras-require = { + passthru.optional-dependencies = { images = [ pillow ]; @@ -38,7 +38,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook - ] ++ passthru.extras-require.images; + ] ++ passthru.optional-dependencies.images; pythonImportsCheck = [ "barcode" ]; diff --git a/pkgs/development/python-modules/pytradfri/default.nix b/pkgs/development/python-modules/pytradfri/default.nix index 70f9acd0380fe..1f523b60eaa03 100644 --- a/pkgs/development/python-modules/pytradfri/default.nix +++ b/pkgs/development/python-modules/pytradfri/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { hash = "sha256-12ol+2CnoPfkxmDGJJAkoafHGpQuWC4lh0N7lSvx2DE="; }; - passthru.extras-require = { + passthru.optional-dependencies = { async = [ aiocoap dtlssocket @@ -31,7 +31,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ] - ++ passthru.extras-require.async; + ++ passthru.optional-dependencies.async; pythonImportsCheck = [ "pytradfri" diff --git a/pkgs/development/python-modules/rdflib/default.nix b/pkgs/development/python-modules/rdflib/default.nix index 1aa998911343c..1aa995d85d772 100644 --- a/pkgs/development/python-modules/rdflib/default.nix +++ b/pkgs/development/python-modules/rdflib/default.nix @@ -43,7 +43,7 @@ buildPythonPackage rec { importlib-metadata ]; - passthru.extras-require = { + passthru.optional-dependencies = { html = [ html5lib ]; @@ -55,8 +55,8 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ] - ++ passthru.extras-require.networkx - ++ passthru.extras-require.html; + ++ passthru.optional-dependencies.networkx + ++ passthru.optional-dependencies.html; pytestFlagsArray = [ # requires network access diff --git a/pkgs/development/python-modules/redis/default.nix b/pkgs/development/python-modules/redis/default.nix index b38975c9c6d67..2018006caa9b9 100644 --- a/pkgs/development/python-modules/redis/default.nix +++ b/pkgs/development/python-modules/redis/default.nix @@ -40,7 +40,7 @@ buildPythonPackage rec { importlib-metadata ]; - passthru.extras-require = { + passthru.optional-dependencies = { hidredis = [ hiredis ]; diff --git a/pkgs/development/python-modules/relatorio/default.nix b/pkgs/development/python-modules/relatorio/default.nix index 86e53cde95d50..1baf6f4b0aacb 100644 --- a/pkgs/development/python-modules/relatorio/default.nix +++ b/pkgs/development/python-modules/relatorio/default.nix @@ -27,14 +27,14 @@ buildPythonPackage rec { lxml ]; - passthru.extras-require = { + passthru.optional-dependencies = { chart = [ /* pycha */ pyyaml ]; fodt = [ python-magic ]; }; checkInputs = [ pytestCheckHook - ] ++ passthru.extras-require.fodt; + ] ++ passthru.optional-dependencies.fodt; pythonImportsCheck = [ "relatorio" ]; diff --git a/pkgs/development/python-modules/requests-aws4auth/default.nix b/pkgs/development/python-modules/requests-aws4auth/default.nix index c38309f6d8d93..e024efb58b0fe 100644 --- a/pkgs/development/python-modules/requests-aws4auth/default.nix +++ b/pkgs/development/python-modules/requests-aws4auth/default.nix @@ -28,13 +28,13 @@ buildPythonPackage rec { six ]; - passthru.extras-require = { + passthru.optional-dependencies = { httpx = [ httpx ]; }; checkInputs = [ pytestCheckHook - ] ++ passthru.extras-require.httpx; + ] ++ passthru.optional-dependencies.httpx; pythonImportsCheck = [ "requests_aws4auth" diff --git a/pkgs/development/python-modules/samsungctl/default.nix b/pkgs/development/python-modules/samsungctl/default.nix index f917c265973af..92af8775d81db 100644 --- a/pkgs/development/python-modules/samsungctl/default.nix +++ b/pkgs/development/python-modules/samsungctl/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { sha256 = "0ipz3fd65rqkxlb02sql0awc3vnslrwb2pfrsnpfnf8bfgxpbh9g"; }; - passthru.extras-require = { + passthru.optional-dependencies = { websocket = [ websocket-client ]; diff --git a/pkgs/development/python-modules/samsungtvws/default.nix b/pkgs/development/python-modules/samsungtvws/default.nix index 383841caffa43..2e97bae92b6a7 100644 --- a/pkgs/development/python-modules/samsungtvws/default.nix +++ b/pkgs/development/python-modules/samsungtvws/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { websocket-client ]; - passthru.extras-require = { + passthru.optional-dependencies = { async = [ aiohttp websockets @@ -55,8 +55,8 @@ buildPythonPackage rec { pytest-asyncio pytestCheckHook ] - ++ passthru.extras-require.async - ++ passthru.extras-require.encrypted; + ++ passthru.optional-dependencies.async + ++ passthru.optional-dependencies.encrypted; pythonImportsCheck = [ "samsungtvws" ]; diff --git a/pkgs/development/python-modules/treq/default.nix b/pkgs/development/python-modules/treq/default.nix index 1902a578ec2bb..0f77463077a0f 100644 --- a/pkgs/development/python-modules/treq/default.nix +++ b/pkgs/development/python-modules/treq/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { requests incremental twisted - ] ++ twisted.extras-require.tls; + ] ++ twisted.optional-dependencies.tls; checkInputs = [ httpbin diff --git a/pkgs/development/python-modules/trytond/default.nix b/pkgs/development/python-modules/trytond/default.nix index 431342cf02d54..7a1ae2af2cc38 100644 --- a/pkgs/development/python-modules/trytond/default.nix +++ b/pkgs/development/python-modules/trytond/default.nix @@ -53,9 +53,9 @@ buildPythonPackage rec { weasyprint gevent pillow - ] ++ relatorio.extras-require.fodt - ++ passlib.extras-require.bcrypt - ++ passlib.extras-require.argon2 + ] ++ relatorio.optional-dependencies.fodt + ++ passlib.optional-dependencies.bcrypt + ++ passlib.optional-dependencies.argon2 ++ lib.optional withPostgresql psycopg2; checkPhase = '' diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix index 8bc03b1e5cf97..ab950e6a96bd3 100644 --- a/pkgs/development/python-modules/twisted/default.nix +++ b/pkgs/development/python-modules/twisted/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ zope_interface incremental automat constantly hyperlink pyhamcrest attrs setuptools typing-extensions ]; - passthru.extras-require = rec { + passthru.optional-dependencies = rec { tls = [ pyopenssl service-identity idna ]; conch = [ pyasn1 cryptography appdirs bcrypt ]; conch_nacl = conch ++ [ pynacl ]; diff --git a/pkgs/development/python-modules/txtorcon/default.nix b/pkgs/development/python-modules/txtorcon/default.nix index 7196e88e8dd93..16dbbbe5395f1 100644 --- a/pkgs/development/python-modules/txtorcon/default.nix +++ b/pkgs/development/python-modules/txtorcon/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ incremental twisted automat zope_interface - ] ++ twisted.extras-require.tls + ] ++ twisted.optional-dependencies.tls ++ lib.optionals (!isPy3k) [ ipaddress ]; checkInputs = [ pytestCheckHook mock lsof GeoIP ]; diff --git a/pkgs/development/python-modules/vivisect/default.nix b/pkgs/development/python-modules/vivisect/default.nix index 8eddde2b65b72..68375a8eadc34 100644 --- a/pkgs/development/python-modules/vivisect/default.nix +++ b/pkgs/development/python-modules/vivisect/default.nix @@ -43,9 +43,9 @@ buildPythonPackage rec { cxxfilt msgpack pycparser - ] ++ lib.optionals (withGui) passthru.extras-require.gui; + ] ++ lib.optionals (withGui) passthru.optional-dependencies.gui; - passthru.extras-require.gui = [ + passthru.optional-dependencies.gui = [ pyqt5 pyqtwebengine ]; diff --git a/pkgs/development/python-modules/volvooncall/default.nix b/pkgs/development/python-modules/volvooncall/default.nix index 247a192588dea..3511d16962ed9 100644 --- a/pkgs/development/python-modules/volvooncall/default.nix +++ b/pkgs/development/python-modules/volvooncall/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { aiohttp ]; - passthru.extras-require = { + passthru.optional-dependencies = { console = [ certifi docopt @@ -49,7 +49,7 @@ buildPythonPackage rec { asynctest pytest-asyncio pytestCheckHook - ] ++ passthru.extras-require.mqtt; + ] ++ passthru.optional-dependencies.mqtt; pythonImportsCheck = [ "volvooncall" ]; diff --git a/pkgs/development/tools/devpi-server/default.nix b/pkgs/development/tools/devpi-server/default.nix index 3f89bd4a1c509..dad3b14c4ca9d 100644 --- a/pkgs/development/tools/devpi-server/default.nix +++ b/pkgs/development/tools/devpi-server/default.nix @@ -46,7 +46,7 @@ buildPythonApplication rec { pyramid strictyaml waitress - ] ++ passlib.extras-require.argon2; + ] ++ passlib.optional-dependencies.argon2; checkInputs = [ beautifulsoup4 diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 581cd277f1575..a312105d7dbb3 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -118,9 +118,9 @@ androidtv pure-python-adb ] - ++ adb-shell.extras-require.async - ++ androidtv.extras-require.async - ++ pure-python-adb.extras-require.async; + ++ adb-shell.optional-dependencies.async + ++ androidtv.optional-dependencies.async + ++ pure-python-adb.optional-dependencies.async; "anel_pwrctrl" = ps: with ps; [ ]; # missing inputs: anel_pwrctrl-homeassistant "anthemav" = ps: with ps; [ @@ -279,7 +279,7 @@ "bluetooth_le_tracker" = ps: with ps; [ pygatt ] - ++ pygatt.extras-require.GATTTOOL; + ++ pygatt.optional-dependencies.GATTTOOL; "bluetooth_tracker" = ps: with ps; [ bt-proximity pybluez @@ -2273,9 +2273,9 @@ wakeonlan zeroconf ] - ++ samsungctl.extras-require.websocket - ++ samsungtvws.extras-require.async - ++ samsungtvws.extras-require.encrypted; + ++ samsungctl.optional-dependencies.websocket + ++ samsungtvws.optional-dependencies.async + ++ samsungtvws.optional-dependencies.encrypted; "satel_integra" = ps: with ps; [ ]; # missing inputs: satel_integra "scene" = ps: with ps; [ @@ -2388,7 +2388,7 @@ "skybeacon" = ps: with ps; [ pygatt ] - ++ pygatt.extras-require.GATTTOOL; + ++ pygatt.optional-dependencies.GATTTOOL; "skybell" = ps: with ps; [ skybellpy ]; @@ -2769,7 +2769,7 @@ "tradfri" = ps: with ps; [ pytradfri ] - ++ pytradfri.extras-require.async; + ++ pytradfri.optional-dependencies.async; "trafikverket_ferry" = ps: with ps; [ pytrafikverket ]; diff --git a/pkgs/servers/home-assistant/parse-requirements.py b/pkgs/servers/home-assistant/parse-requirements.py index 28d8331cfe437..e2ac808b33b48 100755 --- a/pkgs/servers/home-assistant/parse-requirements.py +++ b/pkgs/servers/home-assistant/parse-requirements.py @@ -103,13 +103,13 @@ def repository_root() -> str: return os.path.abspath(sys.argv[0] + "/../../../..") -# For a package attribute and and an extra, check if the package exposes it via passthru.extras-require +# For a package attribute and and an extra, check if the package exposes it via passthru.optional-dependencies def has_extra(package: str, extra: str): cmd = [ "nix-instantiate", repository_root(), "-A", - f"{package}.extras-require.{extra}", + f"{package}.optional-dependencies.{extra}", ] try: subprocess.run( @@ -209,7 +209,7 @@ def main() -> None: attr_paths.append(pname) for extra in extras: # Check if package advertises extra requirements - extra_attr = f"{pname}.extras-require.{extra}" + extra_attr = f"{pname}.optional-dependencies.{extra}" if has_extra(attr_path, extra): extra_attrs.append(extra_attr) else: diff --git a/pkgs/servers/radicale/3.x.nix b/pkgs/servers/radicale/3.x.nix index a8f5a29db8d61..670db1532978f 100644 --- a/pkgs/servers/radicale/3.x.nix +++ b/pkgs/servers/radicale/3.x.nix @@ -21,7 +21,7 @@ python3.pkgs.buildPythonApplication rec { vobject python-dateutil pytz # https://github.com/Kozea/Radicale/issues/816 - ] ++ passlib.extras-require.bcrypt; + ] ++ passlib.optional-dependencies.bcrypt; checkInputs = with python3.pkgs; [ pytestCheckHook diff --git a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix index 938bfa1dcd610..c6107086fde5d 100644 --- a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix +++ b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix @@ -60,8 +60,8 @@ python3Packages.buildPythonApplication rec { html5lib magic-wormhole netifaces pyasn1 pycrypto pyutil pyyaml recommonmark service-identity simplejson sphinx_rtd_theme testtools treq twisted zfec zope_interface - ] ++ twisted.extras-require.tls - ++ twisted.extras-require.conch; + ] ++ twisted.optional-dependencies.tls + ++ twisted.optional-dependencies.conch; checkInputs = with python3Packages; [ mock hypothesis twisted ]; diff --git a/pkgs/tools/security/wapiti/default.nix b/pkgs/tools/security/wapiti/default.nix index 4c24535f8d8cc..c86cd9b8f87e3 100644 --- a/pkgs/tools/security/wapiti/default.nix +++ b/pkgs/tools/security/wapiti/default.nix @@ -39,8 +39,8 @@ python3.pkgs.buildPythonApplication rec { yaswfp ] ++ lib.optionals (python3.pythonOlder "3.8") [ importlib-metadata - ] ++ httpx.extras-require.brotli - ++ httpx.extras-require.socks; + ] ++ httpx.optional-dependencies.brotli + ++ httpx.optional-dependencies.socks; checkInputs = with python3.pkgs; [ respx From 00dab1a9a9d075eb0483f0fd444c608d2afa3cd8 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sat, 21 May 2022 14:54:18 +0300 Subject: [PATCH 16/29] hammer: e7aa734 -> nightly_20220416 This commit also changes the source repository from github.com/UpstandingHackers/hammer to gitlab.special-circumstanc.es/hammer/hammer. --- .../tools/parsing/hammer/default.nix | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/pkgs/development/tools/parsing/hammer/default.nix b/pkgs/development/tools/parsing/hammer/default.nix index 86697c0acdcb7..d1cd4b167003f 100644 --- a/pkgs/development/tools/parsing/hammer/default.nix +++ b/pkgs/development/tools/parsing/hammer/default.nix @@ -1,33 +1,38 @@ -{ lib, stdenv, fetchFromGitHub, glib, pkg-config, scons }: +{ fetchFromGitLab +, glib +, lib +, pkg-config +, scons +, stdenv +}: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "hammer"; - version = "e7aa734"; + version = "nightly_20220416"; - src = fetchFromGitHub { - owner = "UpstandingHackers"; + src = fetchFromGitLab { + domain = "gitlab.special-circumstanc.es"; + owner = "hammer"; repo = "hammer"; - rev = "47f34b81e4de834fd3537dd71928c4f3cdb7f533"; - sha256 = "sha256-aNSmbSgcABF9T1HoFhCnkmON4hY2MtUs7dW38+HigAY="; + rev = version; + sha256 = "sha256-xMZhUnycGeHkNZfHQ2d9mETti8HwGHZNskFqh9f0810="; }; nativeBuildInputs = [ pkg-config scons ]; buildInputs = [ glib ]; - strictDeps = true; - meta = with lib; { description = "A bit-oriented parser combinator library"; longDescription = '' - Hammer is a parsing library. Like many modern parsing libraries, - it provides a parser combinator interface for writing grammars - as inline domain-specific languages, but Hammer also provides a - variety of parsing backends. It's also bit-oriented rather than - character-oriented, making it ideal for parsing binary data such - as images, network packets, audio, and executables. + Hammer is a parsing library. Like many modern parsing libraries, it + provides a parser combinator interface for writing grammars as inline + domain-specific languages, but Hammer also provides a variety of parsing + backends. It's also bit-oriented rather than character-oriented, making it + ideal for parsing binary data such as images, network packets, audio, and + executables. ''; - homepage = "https://github.com/UpstandingHackers/hammer"; + homepage = "https://gitlab.special-circumstanc.es/hammer/hammer"; license = licenses.gpl2; - platforms = platforms.linux; + maintainers = with maintainers; [ azahi ]; }; } From 6e8e1faabeb492f70404c95e33b7d314ae3017e2 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Mon, 18 Apr 2022 13:22:39 +0300 Subject: [PATCH 17/29] nixos/tests: add nginx-http3 test --- nixos/tests/all-tests.nix | 1 + nixos/tests/nginx-http3.nix | 90 ++++++++++++++++++++++++++ pkgs/servers/http/nginx/generic.nix | 2 +- pkgs/tools/networking/curl/default.nix | 4 +- 4 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 nixos/tests/nginx-http3.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 84433806b48cc..0de71030c4fbb 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -365,6 +365,7 @@ in nginx = handleTest ./nginx.nix {}; nginx-auth = handleTest ./nginx-auth.nix {}; nginx-etag = handleTest ./nginx-etag.nix {}; + nginx-http3 = handleTest ./nginx-http3.nix {}; nginx-modsecurity = handleTest ./nginx-modsecurity.nix {}; nginx-pubhtml = handleTest ./nginx-pubhtml.nix {}; nginx-sandbox = handleTestOn ["x86_64-linux"] ./nginx-sandbox.nix {}; diff --git a/nixos/tests/nginx-http3.nix b/nixos/tests/nginx-http3.nix new file mode 100644 index 0000000000000..edd0759464c8a --- /dev/null +++ b/nixos/tests/nginx-http3.nix @@ -0,0 +1,90 @@ +import ./make-test-python.nix ({lib, pkgs, ...}: +let + hosts = '' + 192.168.2.101 acme.test + ''; + +in +{ + name = "nginx-http3"; + meta.maintainers = with pkgs.lib.maintainers; [ izorkin ]; + + nodes = { + server = { pkgs, ... }: { + networking = { + interfaces.eth1 = { + ipv4.addresses = [ + { address = "192.168.2.101"; prefixLength = 24; } + ]; + }; + extraHosts = hosts; + firewall.allowedTCPPorts = [ 443 ]; + firewall.allowedUDPPorts = [ 443 ]; + }; + + security.pki.certificates = [ + (builtins.readFile ./common/acme/server/ca.cert.pem) + ]; + + services.nginx = { + enable = true; + package = pkgs.nginxQuic; + + virtualHosts."acme.test" = { + onlySSL = true; + sslCertificate = ./common/acme/server/acme.test.cert.pem; + sslCertificateKey = ./common/acme/server/acme.test.key.pem; + http2 = true; + http3 = true; + reuseport = true; + root = lib.mkForce (pkgs.runCommandLocal "testdir2" {} '' + mkdir "$out" + cat > "$out/index.html" <Hello World! + EOF + cat > "$out/example.txt" < Date: Sun, 22 May 2022 18:59:01 +0200 Subject: [PATCH 18/29] nautilus-open-any-terminal: 0.2.16 -> 0.3.0 --- pkgs/tools/misc/nautilus-open-any-terminal/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/nautilus-open-any-terminal/default.nix b/pkgs/tools/misc/nautilus-open-any-terminal/default.nix index c62bcbe0bc769..5f0c41cbd4005 100644 --- a/pkgs/tools/misc/nautilus-open-any-terminal/default.nix +++ b/pkgs/tools/misc/nautilus-open-any-terminal/default.nix @@ -15,13 +15,13 @@ python3.pkgs.buildPythonPackage rec { pname = "nautilus-open-any-terminal"; - version = "0.2.16"; + version = "0.3.0"; src = fetchFromGitHub { owner = "Stunkymonkey"; repo = pname; rev = version; - sha256 = "sha256-g5B+tp131vmjShBCGrKR5ZQCjtJY823/kPacZ0S9E80="; + sha256 = "sha256-PF6DVpiAPL9NG4jK6wDqdqYw+26Nks/bGEbbaV/5aIs="; }; patches = [ ./hardcode-gsettings.patch ]; From 5b020adcf61ac51c7381a1bace1326c4c2b27d8f Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 22 May 2022 20:13:19 +0300 Subject: [PATCH 19/29] python3Packages.rasterio: fix on darwin --- pkgs/development/python-modules/rasterio/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/python-modules/rasterio/default.nix b/pkgs/development/python-modules/rasterio/default.nix index 8c73268e6b8de..d7edf7927a8e0 100644 --- a/pkgs/development/python-modules/rasterio/default.nix +++ b/pkgs/development/python-modules/rasterio/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , pythonOlder @@ -17,6 +18,7 @@ , matplotlib , numpy , snuggs +, setuptools # tests , hypothesis @@ -55,6 +57,7 @@ buildPythonPackage rec { matplotlib numpy snuggs + setuptools # needs pkg_resources at runtime ]; preCheck = '' @@ -73,10 +76,19 @@ buildPythonPackage rec { "-m 'not network'" ]; + disabledTests = lib.optionals stdenv.isDarwin [ + "test_reproject_error_propagation" + ]; + pythonImportsCheck = [ "rasterio" ]; + doInstallCheck = true; + installCheckPhase = '' + $out/bin/rio --version | grep ${version} > /dev/null + ''; + meta = with lib; { description = "Python package to read and write geospatial raster data"; homepage = "https://rasterio.readthedocs.io/en/latest/"; From 254ffa6f532d95e16d50aff37ff0a0e07e63dfbe Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 22 May 2022 18:33:08 +0100 Subject: [PATCH 20/29] falcon: use gcc10Stdenv build fails with gcc 11 --- pkgs/development/interpreters/falcon/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/falcon/default.nix b/pkgs/development/interpreters/falcon/default.nix index 0d2aa0b64203f..40c05113ecffe 100644 --- a/pkgs/development/interpreters/falcon/default.nix +++ b/pkgs/development/interpreters/falcon/default.nix @@ -1,6 +1,6 @@ -{ lib, gccStdenv, fetchFromGitHub, cmake, pkg-config, pcre, zlib, sqlite }: +{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, pcre, zlib, sqlite }: -gccStdenv.mkDerivation { +stdenv.mkDerivation { pname = "falcon"; version = "unstable-2018-10-23"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dc79172c31b6d..c4be32fcb8779 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13103,7 +13103,9 @@ with pkgs; hop = callPackage ../development/compilers/hop { }; - falcon = callPackage ../development/interpreters/falcon { }; + falcon = callPackage ../development/interpreters/falcon { + stdenv = gcc10Stdenv; + }; fsharp = callPackage ../development/compilers/fsharp { }; From d6d211b445caf11a88defebf8ad55809c21bf7c8 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 22 May 2022 22:26:13 +0300 Subject: [PATCH 21/29] buildCrystalPackage: enableParallelBuilding --- .../compilers/crystal/build-package.nix | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/pkgs/development/compilers/crystal/build-package.nix b/pkgs/development/compilers/crystal/build-package.nix index 215c3d37d8871..4edf1ddf95891 100644 --- a/pkgs/development/compilers/crystal/build-package.nix +++ b/pkgs/development/compilers/crystal/build-package.nix @@ -24,6 +24,7 @@ # Specify binaries to build in the form { foo.src = "src/foo.cr"; } # The default `crystal build` options can be overridden with { foo.options = [ "--optionname" ]; } , crystalBinaries ? { } +, enableParallelBuilding ? true , ... }@args: @@ -51,6 +52,20 @@ let buildDirectly = shardsFile == null || crystalBinaries != { }; + mkCrystalBuildArgs = bin: attrs: + lib.concatStringsSep " " ([ + "crystal" + "build" + ] ++ lib.optionals enableParallelBuilding [ + "--threads" + "$NIX_BUILD_CORES" + ] ++ [ + "-o" + bin + (attrs.src or (throw "No source file for crystal binary ${bin} provided")) + (lib.concatStringsSep " " (attrs.options or defaultOptions)) + ]); + in stdenv.mkDerivation (mkDerivationArgs // { @@ -72,6 +87,7 @@ stdenv.mkDerivation (mkDerivationArgs // { PREFIX = placeholder "out"; + inherit enableParallelBuilding; strictDeps = true; buildInputs = args.buildInputs or [ ] ++ [ crystal ]; @@ -88,16 +104,7 @@ stdenv.mkDerivation (mkDerivationArgs // { "runHook preBuild" ] ++ lib.optional (format == "make") "make \${buildTargets:-build} $makeFlags" - ++ lib.optionals (format == "crystal") (lib.mapAttrsToList - (bin: attrs: '' - crystal ${lib.escapeShellArgs ([ - "build" - "-o" - bin - (attrs.src or (throw "No source file for crystal binary ${bin} provided")) - ] ++ (attrs.options or defaultOptions))} - '') - crystalBinaries) + ++ lib.optionals (format == "crystal") (lib.mapAttrsToList mkCrystalBuildArgs crystalBinaries) ++ lib.optional (format == "shards") "shards build --local --production ${lib.concatStringsSep " " (args.options or defaultOptions)}" ++ [ "runHook postBuild" ])); From d40419c24194f8a93db21d32828217ced0637ffa Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 22 May 2022 21:11:45 +0100 Subject: [PATCH 22/29] chipsec: restrict to x86-only package is unlikely to support other platforms in the near future - see https://github.com/chipsec/chipsec/issues/461 --- pkgs/tools/security/chipsec/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/security/chipsec/default.nix b/pkgs/tools/security/chipsec/default.nix index 64d8885eedd49..5b4957139d753 100644 --- a/pkgs/tools/security/chipsec/default.nix +++ b/pkgs/tools/security/chipsec/default.nix @@ -68,6 +68,6 @@ python3.pkgs.buildPythonApplication rec { license = licenses.gpl2Only; homepage = "https://github.com/chipsec/chipsec"; maintainers = with maintainers; [ johnazoidberg ]; - platforms = if withDriver then [ "x86_64-linux" ] else platforms.all; + platforms = [ "x86_64-linux" ] ++ lib.optional (!withDriver) "x86_64-darwin"; }; } From 11ba416a6531786257b5ae1059dddca1928b3f8a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 21 May 2022 09:28:15 +0000 Subject: [PATCH 23/29] python310Packages.pyglet: 1.5.24 -> 1.5.26 --- pkgs/development/python-modules/pyglet/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyglet/default.nix b/pkgs/development/python-modules/pyglet/default.nix index 029061b801082..6048991cbff2d 100644 --- a/pkgs/development/python-modules/pyglet/default.nix +++ b/pkgs/development/python-modules/pyglet/default.nix @@ -18,13 +18,13 @@ }: buildPythonPackage rec { - version = "1.5.24"; + version = "1.5.26"; pname = "pyglet"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-W0pNXlrVSUbjFJLqxn9ykuUaZXckRkGidxgPkKAZKo4="; + sha256 = "sha256-7oxeC1uH34QYjiDlUpguuo2gCUS0xVYPHP3VyXFNGbA="; extension = "zip"; }; From f1a5ae8f8d8293df8c920bb6103f8e3e2f22966b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 21 May 2022 08:32:09 +0000 Subject: [PATCH 24/29] deltachat-cursed: 0.3.1 -> 0.4.1 https://github.com/adbenitez/deltachat-cursed/blob/v0.4.1/CHANGELOG.md --- .../instant-messengers/deltachat-cursed/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/deltachat-cursed/default.nix b/pkgs/applications/networking/instant-messengers/deltachat-cursed/default.nix index 0b692104a4fa0..42e5d63240a9d 100644 --- a/pkgs/applications/networking/instant-messengers/deltachat-cursed/default.nix +++ b/pkgs/applications/networking/instant-messengers/deltachat-cursed/default.nix @@ -5,13 +5,13 @@ python3.pkgs.buildPythonApplication rec { pname = "deltachat-cursed"; - version = "0.3.1"; + version = "0.4.1"; src = fetchFromGitHub { owner = "adbenitez"; repo = "deltachat-cursed"; rev = "v${version}"; - hash = "sha256-IZrTPnj6eX1qgEPnEiD9qmVkwn1SMK38gVKAJFgZNfw="; + hash = "sha256-li6HsatiRJPVKKBBHyWhq2b8HhvDrOUiVT2tSupjuag="; }; nativeBuildInputs = [ From ab17708c101647f268918b7ee7e5bc6a087a4f8c Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 22 May 2022 13:27:11 -0700 Subject: [PATCH 25/29] python310Packages.python-glanceclient: 3.6.0 -> 4.0.0 Co-authored-by: Fabian Affolter --- .../python-modules/python-glanceclient/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/python-glanceclient/default.nix b/pkgs/development/python-modules/python-glanceclient/default.nix index 3d290ae5eda5e..f534d4968af1b 100644 --- a/pkgs/development/python-modules/python-glanceclient/default.nix +++ b/pkgs/development/python-modules/python-glanceclient/default.nix @@ -11,6 +11,7 @@ , oslo-i18n , wrapt , pyopenssl +, pythonOlder , stestr , testscenarios , ddt @@ -19,11 +20,14 @@ buildPythonApplication rec { pname = "python-glanceclient"; - version = "3.6.0"; + version = "4.0.0"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - sha256 = "sha256-gi1IYtWJL2pltoKTRy5gsHTRwHlp0GHoBMbh1UP5g9o="; + hash = "sha256-a3tFLmSKuaKbBQy32EkU7sPIEQtN5gaDqoGT03gka+w="; }; postPatch = '' @@ -54,7 +58,9 @@ buildPythonApplication rec { stestr run ''; - pythonImportsCheck = [ "glanceclient" ]; + pythonImportsCheck = [ + "glanceclient" + ]; meta = with lib; { description = "Python bindings for the OpenStack Images API"; From 87bcdd81df312e759a92bd6dbb5b3bdfcdbf233a Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sun, 22 May 2022 14:08:04 -0700 Subject: [PATCH 26/29] roon-server: 1.8-935 -> 1.8-943 --- pkgs/servers/roon-server/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/roon-server/default.nix b/pkgs/servers/roon-server/default.nix index 9e8c0254fca92..206490e49f2ab 100644 --- a/pkgs/servers/roon-server/default.nix +++ b/pkgs/servers/roon-server/default.nix @@ -16,7 +16,7 @@ }: stdenv.mkDerivation rec { pname = "roon-server"; - version = "1.8-935"; + version = "1.8-943"; src = let @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { in fetchurl { url = "http://download.roonlabs.com/builds/RoonServer_linuxx64_${urlVersion}.tar.bz2"; - hash = "sha256-6I612imOCqxVlNu6zCXWS/Yy8bnot+0723t3Se4DjLg="; + hash = "sha256-osQ0/HhcSO6pirUDjOnw0yUsGUsxZI62ViHc6Lb/rT4="; }; dontConfigure = true; From ac191eb2d52f09c4667f606494a52960f4c35261 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sun, 22 May 2022 14:09:59 -0700 Subject: [PATCH 27/29] roon-bridge: 1.8-918 -> 1.8-943 --- pkgs/servers/roon-bridge/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/roon-bridge/default.nix b/pkgs/servers/roon-bridge/default.nix index 4e590dd981867..8b4d81437e2da 100644 --- a/pkgs/servers/roon-bridge/default.nix +++ b/pkgs/servers/roon-bridge/default.nix @@ -11,7 +11,7 @@ }: stdenv.mkDerivation rec { pname = "roon-bridge"; - version = "1.8-918"; + version = "1.8-943"; src = let @@ -21,11 +21,11 @@ stdenv.mkDerivation rec { { x86_64-linux = fetchurl { url = "http://download.roonlabs.com/builds/RoonBridge_linuxx64_${urlVersion}.tar.bz2"; - hash = "sha256-Tx8KmGKh6BNoo2RKJm0HfPHRXiFsz+FtX5gQZ1FCEEg="; + hash = "sha256-knmy2zlRh+ehvYKHC7UN60pMCt8bYPuo9kTz2m0pOW0"; }; aarch64-linux = fetchurl { url = "http://download.roonlabs.com/builds/RoonBridge_linuxarmv8_${urlVersion}.tar.bz2"; - hash = "sha256-UkdAs+/l9c4j8PNlAZfNNCJogjxZItcDikS+tOjYjA0="; + hash = "sha256-urMhtBUjP4HpV9EDZOLLnfnMqhmsWPx0M2+Xdvc8YnU="; }; }.${system} or (throw "Unsupposed system: ${system}"); From d9aa9aa45c44d7c18bc5a7eb747d99e5e6533f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 22 May 2022 22:38:45 +0000 Subject: [PATCH 28/29] python3Packages.airtouch4pyapi: make compatible with Home Assistant --- .../python-modules/airtouch4pyapi/default.nix | 9 +++++++++ pkgs/servers/home-assistant/tests.nix | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/airtouch4pyapi/default.nix b/pkgs/development/python-modules/airtouch4pyapi/default.nix index 193070ac72613..1c567181f9b48 100644 --- a/pkgs/development/python-modules/airtouch4pyapi/default.nix +++ b/pkgs/development/python-modules/airtouch4pyapi/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub +, fetchpatch , numpy , pythonOlder }: @@ -20,6 +21,14 @@ buildPythonPackage rec { sha256 = "17c7fm72p085pg9msvsfdggbskvm12a6jlb5bw1cndrqsqcrxywx"; }; + patches = [ + # https://github.com/LonePurpleWolf/airtouch4pyapi/pull/10 + (fetchpatch { + url = "https://github.com/LonePurpleWolf/airtouch4pyapi/commit/5b5d91fad63495c83422e7a850897946ac95b25d.patch"; + hash = "sha256-tVlCLXuOJSqjbs0jj0iHCIXWZE8wmMV3ChzmE6uq3SM="; + }) + ]; + propagatedBuildInputs = [ numpy ]; diff --git a/pkgs/servers/home-assistant/tests.nix b/pkgs/servers/home-assistant/tests.nix index 26f67e69a546f..d8436bcc9402f 100644 --- a/pkgs/servers/home-assistant/tests.nix +++ b/pkgs/servers/home-assistant/tests.nix @@ -71,7 +71,6 @@ in lib.listToAttrs (map (component: lib.nameValuePair component ( meta = old.meta // { broken = lib.elem component [ - "airtouch4" "bsblan" "dnsip" "efergy" From f01320c21335bf2e240ce3b75e94ac33dfcb7fbd Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 22 May 2022 18:13:55 +0100 Subject: [PATCH 29/29] openambit: pull upstream fix for -fno-common toolchains Without the change build fails on upstream gcc-10 as: ld: CMakeFiles/ambit.dir/libambit.c.o:(.rodata+0x40): multiple definition of `ambit_waypoint_types_from_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:(.rodata+0x20): first defined here --- pkgs/applications/misc/openambit/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/applications/misc/openambit/default.nix b/pkgs/applications/misc/openambit/default.nix index 5ef6d4ae84d41..f3429a05ee6e3 100644 --- a/pkgs/applications/misc/openambit/default.nix +++ b/pkgs/applications/misc/openambit/default.nix @@ -1,5 +1,6 @@ { cmake , fetchFromGitHub +, fetchpatch , lib , libusb1 , mkDerivation @@ -21,6 +22,16 @@ mkDerivation rec { sha256 = "1074kvkamwnlkwdajsw1799wddcfkjh2ay6l842r0s4cvrxrai85"; }; + patches = [ + # Pull upstream patch for -fno-common toolchain support: + # https://github.com/openambitproject/openambit/pull/244 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/openambitproject/openambit/commit/b6d97eab417977b6dbe355e0b071d0a56cc3df6b.patch"; + sha256 = "1p0dg902mlcfjvs01dxl9wv2b50ayp4330p38d14q87mn0c2xl5d"; + }) + ]; + nativeBuildInputs = [ cmake qttools ]; buildInputs = [ libusb1 python3 qtbase udev zlib ];