From f9c43e87acb3f2c724ceab1dffbcbb04e47b6f80 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 12 Feb 2023 13:55:59 +0100 Subject: [PATCH 01/36] python310Packages.ciscoconfparse: add changelog to meta --- pkgs/development/python-modules/ciscoconfparse/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/ciscoconfparse/default.nix b/pkgs/development/python-modules/ciscoconfparse/default.nix index 40018a49c8c..c225c080db7 100644 --- a/pkgs/development/python-modules/ciscoconfparse/default.nix +++ b/pkgs/development/python-modules/ciscoconfparse/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "mpenning"; repo = pname; - rev = version; + rev = "refs/tags/${version}"; hash = "sha256-OKPw7P2hhk8yzqjOcf2NYEueJR1ecC/D93ULfkM88Xg="; }; @@ -60,6 +60,7 @@ buildPythonPackage rec { meta = with lib; { description = "Parse, Audit, Query, Build, and Modify Cisco IOS-style configurations"; homepage = "https://github.com/mpenning/ciscoconfparse"; + changelog = "https://github.com/mpenning/ciscoconfparse/blob/${version}/CHANGES.md"; license = licenses.gpl3Only; maintainers = with maintainers; [ astro ]; }; From 9a1e9d423afea66e56f6c0d011ea07e8b33c3a7f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 12 Feb 2023 14:04:21 +0100 Subject: [PATCH 02/36] python310Packages.deprecat: init at 2.1.1 --- .../python-modules/deprecat/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/deprecat/default.nix diff --git a/pkgs/development/python-modules/deprecat/default.nix b/pkgs/development/python-modules/deprecat/default.nix new file mode 100644 index 00000000000..da81c63cca8 --- /dev/null +++ b/pkgs/development/python-modules/deprecat/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, setuptools-scm +, wrapt +}: + +buildPythonPackage rec { + pname = "deprecat"; + version = "2.1.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "mjhajharia"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-3Xl/IC+ImFUxxLry15MIIVRf6aR+gA9K5S2IQomkv+o="; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + wrapt + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "deprecat" + ]; + + meta = with lib; { + description = "Decorator to deprecate old python classes, functions or methods"; + homepage = "https://github.com/mjhajharia/deprecat"; + changelog = "https://github.com/mjhajharia/deprecat/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cf7d7643e03..94c442fce23 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2369,6 +2369,8 @@ self: super: with self; { deploykit = callPackage ../development/python-modules/deploykit { }; + deprecat = callPackage ../development/python-modules/deprecat { }; + deprecated = callPackage ../development/python-modules/deprecated { }; deprecation = callPackage ../development/python-modules/deprecation { }; From 2db8ff4f424abf54ecf6f74896a59736c414adb9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 12 Feb 2023 14:09:15 +0100 Subject: [PATCH 03/36] python310Packages.ciscoconfparse: 1.6.50 -> 1.7.15 Changelog: https://github.com/mpenning/ciscoconfparse/blob/1.7.15/CHANGES.md --- .../python-modules/ciscoconfparse/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/ciscoconfparse/default.nix b/pkgs/development/python-modules/ciscoconfparse/default.nix index c225c080db7..52cd1a8cf28 100644 --- a/pkgs/development/python-modules/ciscoconfparse/default.nix +++ b/pkgs/development/python-modules/ciscoconfparse/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , dnspython +, deprecat , fetchFromGitHub , loguru , passlib @@ -12,7 +13,7 @@ buildPythonPackage rec { pname = "ciscoconfparse"; - version = "1.6.50"; + version = "1.7.15"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -21,7 +22,7 @@ buildPythonPackage rec { owner = "mpenning"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-OKPw7P2hhk8yzqjOcf2NYEueJR1ecC/D93ULfkM88Xg="; + hash = "sha256-oGvwtaIgVvvW8Oq/dZN+Zj/PESpqWALFYPia9yeilco="; }; postPatch = '' @@ -34,6 +35,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ passlib + deprecat dnspython loguru toml @@ -51,6 +53,8 @@ buildPythonPackage rec { # Tests require network access "test_dns_lookup" "test_reverse_dns_lookup" + # Path issues with configuration files + "testParse_valid_filepath" ]; pythonImportsCheck = [ @@ -58,7 +62,7 @@ buildPythonPackage rec { ]; meta = with lib; { - description = "Parse, Audit, Query, Build, and Modify Cisco IOS-style configurations"; + description = "Module to parse, audit, query, build, and modify Cisco IOS-style configurations"; homepage = "https://github.com/mpenning/ciscoconfparse"; changelog = "https://github.com/mpenning/ciscoconfparse/blob/${version}/CHANGES.md"; license = licenses.gpl3Only; From 07942cdbdf40df390eb29ddf3f8f0264deb9623e Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 12 Feb 2023 07:55:59 -0800 Subject: [PATCH 04/36] setup-hooks/reproducible-builds.sh: NIX_OUTPATH_USED_AS_RANDOM_SEED For reproducibility, nixpkgs sets `-frandom-seed` to the first 10 characters of the outpath of the derivation being built. This PR allows to manually select from which outpath the 10-character prefix is taken, by setting `NIX_OUTPATH_USED_AS_RANDOM_SEED` as a derivation attribute (or directly as an environment variable). For an example use of this functionality, see: https://github.com/NixOS/nixpkgs/pull/209870 --- pkgs/build-support/setup-hooks/reproducible-builds.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/setup-hooks/reproducible-builds.sh b/pkgs/build-support/setup-hooks/reproducible-builds.sh index 7b52f84df67..5e27ce8a25f 100644 --- a/pkgs/build-support/setup-hooks/reproducible-builds.sh +++ b/pkgs/build-support/setup-hooks/reproducible-builds.sh @@ -3,7 +3,8 @@ # derivation and not easily collide with other builds. # We also truncate the hash so that it cannot cause reference cycles. NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE:-} -frandom-seed=$( - outbase="${out##*/}" + randSeed=${NIX_OUTPATH_USED_AS_RANDOM_SEED:-$out} + outbase="${randSeed##*/}" randomseed="${outbase:0:10}" echo $randomseed )" From c73f3cf9276f742f4cd65aee51953553b4732838 Mon Sep 17 00:00:00 2001 From: Kiskae Date: Mon, 13 Feb 2023 18:27:53 +0100 Subject: [PATCH 05/36] xwayland: enable libunwind --- pkgs/servers/x11/xorg/xwayland.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/x11/xorg/xwayland.nix b/pkgs/servers/x11/xorg/xwayland.nix index 582ec11231c..c76295cec83 100644 --- a/pkgs/servers/x11/xorg/xwayland.nix +++ b/pkgs/servers/x11/xorg/xwayland.nix @@ -95,11 +95,12 @@ stdenv.mkDerivation rec { zlib ]; mesonFlags = [ - "-Dxwayland_eglstream=true" - "-Ddefault_font_path=${defaultFontPath}" - "-Dxkb_bin_dir=${xkbcomp}/bin" - "-Dxkb_dir=${xkeyboard_config}/etc/X11/xkb" - "-Dxkb_output_dir=${placeholder "out"}/share/X11/xkb/compiled" + (lib.mesonBool "xwayland_eglstream" true) + (lib.mesonOption "default_font_path" defaultFontPath) + (lib.mesonOption "xkb_bin_dir" "${xkbcomp}/bin") + (lib.mesonOption "xkb_dir" "${xkeyboard_config}/etc/X11/xkb") + (lib.mesonOption "xkb_output_dir" "${placeholder "out"}/share/X11/xkb/compiled") + (lib.mesonBool "libunwind" (libunwind != null)) ]; meta = with lib; { From 463ab8deaa17d333be2ff7c61bea4e8e664e71cb Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 14 Feb 2023 19:29:36 +0800 Subject: [PATCH 06/36] Revert "libvisual: fix null malloc check on cross" This reverts commit a656aeb7f134a3ac8376dcf527cf29327d2d796e. As of now these flags are no longer required for cross compilation --- pkgs/development/libraries/libvisual/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/development/libraries/libvisual/default.nix b/pkgs/development/libraries/libvisual/default.nix index f32ee433694..d7bf28a94e4 100644 --- a/pkgs/development/libraries/libvisual/default.nix +++ b/pkgs/development/libraries/libvisual/default.nix @@ -18,11 +18,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ SDL glib ]; - configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ - "ac_cv_func_malloc_0_nonnull=yes" - "ac_cv_func_realloc_0_nonnull=yes" - ]; - meta = { description = "An abstraction library for audio visualisations"; homepage = "https://sourceforge.net/projects/libvisual/"; From 11b095e8805aa123a4d77a5e706bebaf86622879 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 14 Feb 2023 19:35:00 +0800 Subject: [PATCH 07/36] libvisual: disable building examples when cross compiling the examples depend on SDL, and sdl-config is not available when crossing --- pkgs/development/libraries/libvisual/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libvisual/default.nix b/pkgs/development/libraries/libvisual/default.nix index d7bf28a94e4..b58c25401c9 100644 --- a/pkgs/development/libraries/libvisual/default.nix +++ b/pkgs/development/libraries/libvisual/default.nix @@ -4,6 +4,8 @@ , SDL , glib , pkg-config + # sdl-config is not available when crossing +, withExamples ? stdenv.buildPlatform == stdenv.hostPlatform }: stdenv.mkDerivation rec { @@ -16,7 +18,9 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ SDL glib ]; + buildInputs = lib.optional withExamples SDL ++ [ glib ]; + + configureFlags = lib.optional (!withExamples) "--disable-examples"; meta = { description = "An abstraction library for audio visualisations"; From e5ef7ae79e756cee3cf492e9c17b0f6c4f23d1ec Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 16 Feb 2023 14:05:10 +0800 Subject: [PATCH 08/36] tdesktop: 4.6.2 -> 4.6.3 Release: https://github.com/telegramdesktop/tdesktop/releases/tag/v4.6.3 Changes: https://github.com/telegramdesktop/tdesktop/compare/v4.6.2...v4.6.3 --- .../instant-messengers/telegram/tdesktop/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix index e292fb25211..dbcb872d161 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix @@ -75,7 +75,7 @@ let in env.mkDerivation rec { pname = "telegram-desktop"; - version = "4.6.2"; + version = "4.6.3"; # Note: Update via pkgs/applications/networking/instant-messengers/telegram/tdesktop/update.py # Telegram-Desktop with submodules @@ -84,7 +84,7 @@ env.mkDerivation rec { repo = "tdesktop"; rev = "v${version}"; fetchSubmodules = true; - sha256 = "0lrflhnlsajay8gbz1x91fqk2ckxwpqmm19hyjfqxkvi56nl7a0g"; + sha256 = "1kv7aqj4d85iz6vbgvfplyfr9y3rw31xhdgwiskrdfv8mqb0mr5v"; }; postPatch = '' From 4e2079b96d281212b695ca557755909799f163ad Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Thu, 16 Feb 2023 09:58:18 -0800 Subject: [PATCH 09/36] linux_{5_15,6_1}: revert patch to fix Equinix Metal bonded networking with `ice` driver Some Equinix Metal instances, such as a3.large.x86, m3.large.x86 (specific hardware revisions), and n3.large.x86, use the `ice` kernel driver for their network cards, in conjunction with bonded devices. However, this commit caused a regression where these bonded devices would deadlock. This was initially reported by Jaroslav Pulchart on the netdev mailing list[1], and there were follow-up patches from Dave Ertman[2][3] that attempted to fix this but were not up to snuff for various reasons[4]. Specifically, v2 of the patch ([3]) appears to fix the issue on some devices (tested with 8086:159B network cards), while it is still broken on others (such as an 8086:1593 network card). We revert the patch exposing the issue until upstream has a working solution in order to make Equinix Metal instances work reliably again. [1]: https://lore.kernel.org/netdev/CAK8fFZ6A_Gphw_3-QMGKEFQk=sfCw1Qmq0TVZK3rtAi7vb621A@mail.gmail.com/ [2]: https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20230111183145.1497367-1-david.m.ertman@intel.com/ [3]: https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20230215191757.1826508-1-david.m.ertman@intel.com/ [4]: https://lore.kernel.org/netdev/cb31a911-ba80-e2dc-231f-851757cfd0b8@intel.com/T/#m6e53f8c43093693c10268140126abe99e082dc1c --- .../linux/kernel/fix-em-ice-bonding.patch | 87 +++++++++++++++++++ pkgs/os-specific/linux/kernel/patches.nix | 5 ++ pkgs/top-level/linux-kernels.nix | 2 + 3 files changed, 94 insertions(+) create mode 100644 pkgs/os-specific/linux/kernel/fix-em-ice-bonding.patch diff --git a/pkgs/os-specific/linux/kernel/fix-em-ice-bonding.patch b/pkgs/os-specific/linux/kernel/fix-em-ice-bonding.patch new file mode 100644 index 00000000000..2b59a508fda --- /dev/null +++ b/pkgs/os-specific/linux/kernel/fix-em-ice-bonding.patch @@ -0,0 +1,87 @@ +From 1640688018f329559c61352646f283f98938af31 Mon Sep 17 00:00:00 2001 +From: Cole Helbling +Date: Thu, 16 Feb 2023 09:30:21 -0800 +Subject: [PATCH] Revert "RDMA/irdma: Report the correct link speed" + +This reverts commit 425c9bd06b7a70796d880828d15c11321bdfb76d. + +Some Equinix Metal instances, such as a3.large.x86, m3.large.x86 +(specific hardware revisions), and n3.large.x86, use the `ice` kernel +driver for their network cards, in conjunction with bonded devices. +However, this commit caused a regression where these bonded devices +would deadlock. This was initially reported by Jaroslav Pulchart on +the netdev mailing list[1], and there were follow-up patches from Dave +Ertman[2][3] that attempted to fix this but were not up to snuff for +various reasons[4]. + +Specifically, v2 of the patch ([3]) appears to fix the issue on some +devices (tested with 8086:159B network cards), while it is still broken +on others (such as an 8086:1593 network card). + +We revert the patch exposing the issue until upstream has a working +solution in order to make Equinix Metal instances work reliably again. + +[1]: https://lore.kernel.org/netdev/CAK8fFZ6A_Gphw_3-QMGKEFQk=sfCw1Qmq0TVZK3rtAi7vb621A@mail.gmail.com/ +[2]: https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20230111183145.1497367-1-david.m.ertman@intel.com/ +[3]: https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20230215191757.1826508-1-david.m.ertman@intel.com/ +[4]: https://lore.kernel.org/netdev/cb31a911-ba80-e2dc-231f-851757cfd0b8@intel.com/T/#m6e53f8c43093693c10268140126abe99e082dc1c +--- + drivers/infiniband/hw/irdma/verbs.c | 35 ++++++++++++++++++++++++++--- + 1 file changed, 32 insertions(+), 3 deletions(-) + +diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c +index c5971a840b87..911902d2b93e 100644 +--- a/drivers/infiniband/hw/irdma/verbs.c ++++ b/drivers/infiniband/hw/irdma/verbs.c +@@ -60,6 +60,36 @@ static int irdma_query_device(struct ib_device *ibdev, + return 0; + } + ++/** ++ * irdma_get_eth_speed_and_width - Get IB port speed and width from netdev speed ++ * @link_speed: netdev phy link speed ++ * @active_speed: IB port speed ++ * @active_width: IB port width ++ */ ++static void irdma_get_eth_speed_and_width(u32 link_speed, u16 *active_speed, ++ u8 *active_width) ++{ ++ if (link_speed <= SPEED_1000) { ++ *active_width = IB_WIDTH_1X; ++ *active_speed = IB_SPEED_SDR; ++ } else if (link_speed <= SPEED_10000) { ++ *active_width = IB_WIDTH_1X; ++ *active_speed = IB_SPEED_FDR10; ++ } else if (link_speed <= SPEED_20000) { ++ *active_width = IB_WIDTH_4X; ++ *active_speed = IB_SPEED_DDR; ++ } else if (link_speed <= SPEED_25000) { ++ *active_width = IB_WIDTH_1X; ++ *active_speed = IB_SPEED_EDR; ++ } else if (link_speed <= SPEED_40000) { ++ *active_width = IB_WIDTH_4X; ++ *active_speed = IB_SPEED_FDR10; ++ } else { ++ *active_width = IB_WIDTH_4X; ++ *active_speed = IB_SPEED_EDR; ++ } ++} ++ + /** + * irdma_query_port - get port attributes + * @ibdev: device pointer from stack +@@ -87,9 +117,8 @@ static int irdma_query_port(struct ib_device *ibdev, u32 port, + props->state = IB_PORT_DOWN; + props->phys_state = IB_PORT_PHYS_STATE_DISABLED; + } +- +- ib_get_eth_speed(ibdev, port, &props->active_speed, +- &props->active_width); ++ irdma_get_eth_speed_and_width(SPEED_100000, &props->active_speed, ++ &props->active_width); + + if (rdma_protocol_roce(ibdev, 1)) { + props->gid_tbl_len = 32; +-- +2.39.0 + diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index f941ca9f007..5912abf4181 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -57,4 +57,9 @@ name = "export-rt-sched-migrate"; patch = ./export-rt-sched-migrate.patch; }; + + fix-em-ice-bonding = { + name = "fix-em-ice-bonding"; + patch = ./fix-em-ice-bonding.patch; + }; } diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 56225b6d424..07b221caba7 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -148,6 +148,7 @@ in { kernelPatches = [ kernelPatches.bridge_stp_helper kernelPatches.request_key_helper + kernelPatches.fix-em-ice-bonding ]; }; @@ -169,6 +170,7 @@ in { kernelPatches = [ kernelPatches.bridge_stp_helper kernelPatches.request_key_helper + kernelPatches.fix-em-ice-bonding ]; }; From eea7098f5b36dde7043337dc94ec045fa38fd43c Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 17 Feb 2023 04:20:00 +0000 Subject: [PATCH 10/36] lxd: 5.10 -> 5.11 https://github.com/lxc/lxd/releases/tag/lxd-5.11 --- pkgs/tools/admin/lxd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/admin/lxd/default.nix b/pkgs/tools/admin/lxd/default.nix index a0db37fba54..9f164d86140 100644 --- a/pkgs/tools/admin/lxd/default.nix +++ b/pkgs/tools/admin/lxd/default.nix @@ -32,14 +32,14 @@ buildGoModule rec { pname = "lxd"; - version = "5.10"; + version = "5.11"; src = fetchurl { urls = [ "https://linuxcontainers.org/downloads/lxd/lxd-${version}.tar.gz" "https://github.com/lxc/lxd/releases/download/lxd-${version}/lxd-${version}.tar.gz" ]; - hash = "sha256-sYJkPr/tE22xJEjKX7fMjOLQ9zBDm52UjqbVLrm39zU="; + hash = "sha256-6z6C1nWmnHLdLtLf7l1f4riGhuP2J2mt8mVWZIiege0="; }; vendorSha256 = null; From e34febdd88aab94c4167a37bebae4d2b890347ac Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Fri, 17 Feb 2023 15:00:19 +0100 Subject: [PATCH 11/36] kitty-themes: 2022-08-11 -> 2023-01-08 --- pkgs/misc/kitty-themes/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/kitty-themes/default.nix b/pkgs/misc/kitty-themes/default.nix index ad6cdf9bfa6..f9ac2181a41 100644 --- a/pkgs/misc/kitty-themes/default.nix +++ b/pkgs/misc/kitty-themes/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "kitty-themes"; - version = "unstable-2022-08-11"; + version = "unstable-2023-01-08"; src = fetchFromGitHub { owner = "kovidgoyal"; repo = pname; - rev = "72cf0dc4338ab1ad85f5ed93fdb13318916cae14"; - sha256 = "d9mO2YqA7WD2dTPsmNeQg2dUR/iv2T/l7yxrt6WKX60="; + rev = "e0bb9d751033e82e455bf658744872c83f04b89d"; + sha256 = "sha256-ol/AWScGsskoxOEW32aGkJFgg8V6pIujoYIMQaVskWM="; }; installPhase = '' From 5123929a70e353f13b99d78a2491d8395917eae1 Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Thu, 3 Nov 2022 10:23:43 -0400 Subject: [PATCH 12/36] kodelife: add updateScript --- .../graphics/kodelife/default.nix | 2 + pkgs/applications/graphics/kodelife/update.sh | 54 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100755 pkgs/applications/graphics/kodelife/update.sh diff --git a/pkgs/applications/graphics/kodelife/default.nix b/pkgs/applications/graphics/kodelife/default.nix index a05dbc28be0..45688725c2a 100644 --- a/pkgs/applications/graphics/kodelife/default.nix +++ b/pkgs/applications/graphics/kodelife/default.nix @@ -95,6 +95,8 @@ stdenv.mkDerivation rec { runHook postInstall ''; + passthru.updateScript = ./update.sh; + meta = with lib; { homepage = "https://hexler.net/kodelife"; description = "Real-time GPU shader editor"; diff --git a/pkgs/applications/graphics/kodelife/update.sh b/pkgs/applications/graphics/kodelife/update.sh new file mode 100755 index 00000000000..992f7c2bf43 --- /dev/null +++ b/pkgs/applications/graphics/kodelife/update.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p nix curl libxml2 jq + +set -euo pipefail + +nixpkgs="$(git rev-parse --show-toplevel || (printf 'Could not find root of nixpkgs repo\nAre we running from within the nixpkgs git repo?\n' >&2; exit 1))" + +attr="${UPDATE_NIX_ATTR_PATH:-kodelife}" +version="$(curl -sSL https://hexler.net/kodelife/appcast/linux | xmllint --xpath '/rss/channel/item/enclosure/@*[local-name()="version"]' - | cut -d= -f2- | tr -d '"' | head -n1)" + +narhash() { + nix --extra-experimental-features nix-command store prefetch-file --json "$url" | jq -r .hash +} + +nixeval() { + if [ "$#" -ge 2 ]; then + systemargs=(--argstr system "$2") + else + systemargs=() + fi + + nix --extra-experimental-features nix-command eval --json --impure "${systemargs[@]}" -f "$nixpkgs" "$1" | jq -r . +} + +findpath() { + path="$(nix --extra-experimental-features nix-command eval --json --impure -f "$nixpkgs" "$1.meta.position" | jq -r . | cut -d: -f1)" + outpath="$(nix --extra-experimental-features nix-command eval --json --impure --expr "builtins.fetchGit \"$nixpkgs\"")" + + if [ -n "$outpath" ]; then + path="${path/$(echo "$outpath" | jq -r .)/$nixpkgs}" + fi + + echo "$path" +} + +oldversion="${UPDATE_NIX_OLD_VERSION:-$(nixeval "$attr".version)}" + +pkgpath="$(findpath "$attr")" + +if [ "$version" = "$oldversion" ]; then + echo 'update.sh: New version same as old version, nothing to do.' + exit 0 +fi + +sed -i -e "/version\s*=/ s|\"$oldversion\"|\"$version\"|" "$pkgpath" + +for system in aarch64-linux armv7l-linux x86_64-linux; do + url="$(nixeval "$attr".src.url "$system")" + + curhash="$(nixeval "$attr".src.outputHash "$system")" + newhash="$(narhash "$url")" + + sed -i -e "s|\"$curhash\"|\"$newhash\"|" "$pkgpath" +done From ffc11107d9c77fc37d8324806c9ebbc4b706f411 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 17 Feb 2023 21:01:26 +0100 Subject: [PATCH 13/36] grype: 0.56.0 -> 0.57.1 Diff: https://github.com/anchore/grype.git/compare/v0.56.0...v0.57.1 Changelog: https://github.com/anchore/grype/releases/tag/v0.57.1 --- pkgs/tools/security/grype/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/grype/default.nix b/pkgs/tools/security/grype/default.nix index 9b3a9a44d9c..f73710c1d19 100644 --- a/pkgs/tools/security/grype/default.nix +++ b/pkgs/tools/security/grype/default.nix @@ -8,13 +8,13 @@ buildGoModule rec { pname = "grype"; - version = "0.56.0"; + version = "0.57.1"; src = fetchFromGitHub { owner = "anchore"; repo = pname; rev = "v${version}"; - hash = "sha256-xNv4pI6iT6lNmjeUIW8ObPFJw9H1SiVTg9fRx6Osiwc="; + hash = "sha256-NACasOoCABoHmb4U5LvQ8EPO7G10A7uQtX4th/WJqrw="; # populate values that require us to use git. By doing this in postFetch we # can delete .git afterwards and maintain better reproducibility of the src. leaveDotGit = true; @@ -28,7 +28,7 @@ buildGoModule rec { }; proxyVendor = true; - vendorHash = "sha256-Sez5jNFdL11cHBBPcY0b8qUiupmjPo9MHwUUi7FaNiA="; + vendorHash = "sha256-DLY0tcacGFcP17IqUVvpVkUjd2xQMO5JZxltmL4b+Wo="; nativeBuildInputs = [ installShellFiles From 66e3615642b27e39f83c0558f2e2c9a8b153acb4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 18 Feb 2023 00:08:25 +0100 Subject: [PATCH 14/36] python310Packages.fortiosapi: add missing input --- .../python-modules/fortiosapi/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/fortiosapi/default.nix b/pkgs/development/python-modules/fortiosapi/default.nix index 8b0425c3881..5b6bce687ea 100644 --- a/pkgs/development/python-modules/fortiosapi/default.nix +++ b/pkgs/development/python-modules/fortiosapi/default.nix @@ -5,18 +5,23 @@ , packaging , paramiko , pexpect +, pythonOlder , requests +, six }: buildPythonPackage rec { pname = "fortiosapi"; version = "1.0.5"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "fortinet-solutions-cse"; repo = pname; - rev = "v${version}"; - sha256 = "0679dizxcd4sk1b4h6ss8qsbjb3c8qyijlp4gzjqji91w6anzg9k"; + rev = "refs/tags/v${version}"; + hash = "sha256-M71vleEhRYnlf+RSGT1GbCy5NEZaG0hWmJo01n9s6Rg="; }; propagatedBuildInputs = [ @@ -25,11 +30,15 @@ buildPythonPackage rec { paramiko packaging oyaml + six ]; # Tests require a local VM doCheck = false; - pythonImportsCheck = [ "fortiosapi" ]; + + pythonImportsCheck = [ + "fortiosapi" + ]; meta = with lib; { description = "Python module to work with Fortigate/Fortios devices"; From cce3f9204cca6d9a1573eafe6f31a4d64172a061 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 14 Feb 2023 08:06:22 +0100 Subject: [PATCH 15/36] python310Packages.jaconv: update rev --- pkgs/development/python-modules/jaconv/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/jaconv/default.nix b/pkgs/development/python-modules/jaconv/default.nix index d65aca69316..dbac6505cc1 100644 --- a/pkgs/development/python-modules/jaconv/default.nix +++ b/pkgs/development/python-modules/jaconv/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "ikegami-yukino"; repo = pname; - rev = "v${version}"; + rev = "refs/tags/v${version}"; hash = "sha256-uzGHvklFHVoNloZauczgITeHQIgYQAfI9cjLWgG/vyI="; }; From af1a1062417456fb9188283daa502631c9a469f4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 18 Feb 2023 01:20:21 +0100 Subject: [PATCH 16/36] python310Packages.jaconv: 0.3.1 -> 0.3.4 Diff: https://github.com/ikegami-yukino/jaconv/compare/refs/tags/v0.3.1...v0.3.4 Changelog: https://github.com/ikegami-yukino/jaconv/blob/v0.3.4/CHANGES.rst --- pkgs/development/python-modules/jaconv/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/jaconv/default.nix b/pkgs/development/python-modules/jaconv/default.nix index dbac6505cc1..a7800b783a8 100644 --- a/pkgs/development/python-modules/jaconv/default.nix +++ b/pkgs/development/python-modules/jaconv/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "jaconv"; - version = "0.3.1"; + version = "0.3.4"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "ikegami-yukino"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-uzGHvklFHVoNloZauczgITeHQIgYQAfI9cjLWgG/vyI="; + hash = "sha256-9ruhOLaYNESeKOwJs3IN6ct66fSq7My9DOyA7/cH3d0="; }; nativeCheckInputs = [ From 535bad9f92349581a38955151802d63df91bd84b Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 17 Feb 2023 19:44:15 -0500 Subject: [PATCH 17/36] cargo-semver-checks: 0.18.0 -> 0.18.1 Diff: https://github.com/obi1kenobi/cargo-semver-checks/compare/v0.18.0...v0.18.1 --- pkgs/development/tools/rust/cargo-semver-checks/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-semver-checks/default.nix b/pkgs/development/tools/rust/cargo-semver-checks/default.nix index 1f26f23e15c..1d59373f30a 100644 --- a/pkgs/development/tools/rust/cargo-semver-checks/default.nix +++ b/pkgs/development/tools/rust/cargo-semver-checks/default.nix @@ -10,16 +10,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-semver-checks"; - version = "0.18.0"; + version = "0.18.1"; src = fetchFromGitHub { owner = "obi1kenobi"; repo = pname; rev = "v${version}"; - sha256 = "sha256-ugcmsm1j2a1wOnUe9u70yoRXALCmtXSnb80N4B4IUWE="; + sha256 = "sha256-nxQ060M5TEUMKtJZ1j3A3v3s1cW1mnHy0/2ZXbxoaMc="; }; - cargoSha256 = "sha256-PxnPCevjVvmFMlmYv6qwIBZk2MThz65hgUyVhm2tzlc="; + cargoSha256 = "sha256-D/rY9d50uKkheEeHe6S04TSdmTyUVgrABIYrFOuZudY="; nativeBuildInputs = [ pkg-config ]; From a7deb859a892e7fbb91307f6c256ee6e30f1980b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 18 Feb 2023 03:37:57 +0100 Subject: [PATCH 18/36] python310Packages.tensorflow: remove ? null from inputs --- pkgs/development/python-modules/tensorflow/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index bbc7087ba2c..8cd3231bea0 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -18,7 +18,7 @@ # it would also make the default tensorflow package unfree. See # https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0 , cudaSupport ? false, cudaPackages ? {} -, mklSupport ? false, mkl ? null +, mklSupport ? false, mkl , tensorboardSupport ? true # XLA without CUDA is broken , xlaSupport ? cudaSupport @@ -39,8 +39,6 @@ assert cudaSupport -> cudatoolkit != null # unsupported combination assert ! (stdenv.isDarwin && cudaSupport); -assert mklSupport -> mkl != null; - let withTensorboard = (pythonOlder "3.6") || tensorboardSupport; From 0980625b3c4c99c23dadf3a6df515945ea60de08 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 18 Feb 2023 05:42:53 +0000 Subject: [PATCH 19/36] python310Packages.pipdeptree: 2.3.3 -> 2.4.0 --- pkgs/development/python-modules/pipdeptree/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pipdeptree/default.nix b/pkgs/development/python-modules/pipdeptree/default.nix index 186e468e049..39bdc6ad44e 100644 --- a/pkgs/development/python-modules/pipdeptree/default.nix +++ b/pkgs/development/python-modules/pipdeptree/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "pipdeptree"; - version = "2.3.3"; + version = "2.4.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "tox-dev"; repo = "pipdeptree"; rev = "refs/tags/${version}"; - hash = "sha256-ivqu9b+4FhGa5y+WnKRk4nF6MR4Vj62pSs2d7ycIZMc="; + hash = "sha256-agjerQTSkrpHCleqNUxg+NFiPnf9u9DQrs3vSR917oE="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; From c79e326a5919075eb6386e7485b691324595e71c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 18 Feb 2023 05:01:18 +0000 Subject: [PATCH 20/36] erlang: 25.2.2 -> 25.2.3 --- pkgs/development/interpreters/erlang/R25.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/erlang/R25.nix b/pkgs/development/interpreters/erlang/R25.nix index b2ad0846cd6..991880bc31e 100644 --- a/pkgs/development/interpreters/erlang/R25.nix +++ b/pkgs/development/interpreters/erlang/R25.nix @@ -1,6 +1,6 @@ { mkDerivation }: mkDerivation { - version = "25.2.2"; - sha256 = "HfEh2IhifFe/gQ4sK99uBnmUGvNCeJ2mlTQf7IzenEs="; + version = "25.2.3"; + sha256 = "peTH8hDOEuMq18exbFhtEMrQQEqg2FPkapfNnnEfTYE="; } From 145630955db0e5cb91cb3806b2a2a191edafa213 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 18 Feb 2023 06:40:43 +0000 Subject: [PATCH 21/36] flexget: 3.5.24 -> 3.5.25 --- pkgs/applications/networking/flexget/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/flexget/default.nix b/pkgs/applications/networking/flexget/default.nix index 818ceb74ea0..74d51ce4304 100644 --- a/pkgs/applications/networking/flexget/default.nix +++ b/pkgs/applications/networking/flexget/default.nix @@ -5,7 +5,7 @@ python3Packages.buildPythonApplication rec { pname = "flexget"; - version = "3.5.24"; + version = "3.5.25"; format = "pyproject"; # Fetch from GitHub in order to use `requirements.in` @@ -13,7 +13,7 @@ python3Packages.buildPythonApplication rec { owner = "flexget"; repo = "flexget"; rev = "refs/tags/v${version}"; - hash = "sha256-4RQBaqC3nmyEq9Kqg0n9KIN9Gw4Z+uCl6hQeqo/NTls="; + hash = "sha256-Xb33/wz85RjBpRkKD09hfDr6txoB1ksKphbjrVt0QWg="; }; postPatch = '' From 06841a64aaf15fa81b3f9ded0f4842aa2f49e336 Mon Sep 17 00:00:00 2001 From: Nikola Knezevic Date: Wed, 15 Feb 2023 13:53:28 +0100 Subject: [PATCH 22/36] tvdb_api: unblock by using the latest version Unreleased version (there have not been any updates since April 2021) contains fixes to _to_bytes issue that caused tvdb_api to fail to build. --- .../python-modules/tvdb_api/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/tvdb_api/default.nix b/pkgs/development/python-modules/tvdb_api/default.nix index 91b360f936e..7889a8ab03e 100644 --- a/pkgs/development/python-modules/tvdb_api/default.nix +++ b/pkgs/development/python-modules/tvdb_api/default.nix @@ -1,17 +1,19 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , requests-cache , pytest }: buildPythonPackage rec { pname = "tvdb_api"; - version = "3.1.0"; + version = "3.2.0-beta"; - src = fetchPypi { - inherit pname version; - sha256 = "f63f6db99441bb202368d44aaabc956acc4202b18fc343a66bf724383ee1f563"; + src = fetchFromGitHub { + owner = "dbr"; + repo = "tvdb_api"; + rev = "ce0382181a9e08a5113bfee0fed2c78f8b1e613f"; + sha256 = "sha256-poUuwySr6+8U9PIHhqFaR7nXzh8kSaW7mZkuKTUJKj8="; }; propagatedBuildInputs = [ requests-cache ]; @@ -26,7 +28,5 @@ buildPythonPackage rec { homepage = "https://github.com/dbr/tvdb_api"; license = licenses.unlicense; maintainers = with maintainers; [ peterhoeg ]; - # https://github.com/dbr/tvdb_api/issues/94 - broken = true; }; } From aae8cfd998b52cba9977e54d11e30881038a8c93 Mon Sep 17 00:00:00 2001 From: Nikola Knezevic Date: Wed, 15 Feb 2023 13:55:42 +0100 Subject: [PATCH 23/36] tvnamer: add setuptools dependency to requests-cache 0.5.2 tvnamer has a direct dependency on old version of requests-cache 0.5.2. Unfortunately, it was failing to build as it was missing setuptools. This change adds this dependency. Along with the fixes to tvdb_api, now tvnamer correctly builds. --- pkgs/tools/misc/tvnamer/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/misc/tvnamer/default.nix b/pkgs/tools/misc/tvnamer/default.nix index 204914c280c..abe5c75f8b8 100644 --- a/pkgs/tools/misc/tvnamer/default.nix +++ b/pkgs/tools/misc/tvnamer/default.nix @@ -4,16 +4,20 @@ let python' = python3.override { - packageOverrides = self: super: rec { + packageOverrides = final: prev: rec { # tvdb_api v3.1.0 has a hard requirement on requests-cache < 0.6 - requests-cache = super.requests-cache.overridePythonAttrs (super: rec { + requests-cache = prev.requests-cache.overridePythonAttrs (oldAttrs: rec { version = "0.5.2"; - src = self.fetchPypi { - inherit (super) pname; + src = final.fetchPypi { + inherit (oldAttrs) pname; inherit version; sha256 = "sha256-gTAjJpaGBF+OAeIonMHn6a5asi3dHihJqQk6s6tycOs="; }; + nativeBuildInputs = with final; [ + setuptools + ]; + # too many changes have been made to requests-cache based on version 0.6 so # simply disable tests doCheck = false; From 0fcc1b8ef83241283cccb2be0882b661860bd081 Mon Sep 17 00:00:00 2001 From: "Bryan A. S" Date: Thu, 9 Feb 2023 06:55:52 -0300 Subject: [PATCH 24/36] kubeshark: init at 38.5 --- .../networking/cluster/kubeshark/default.nix | 60 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/applications/networking/cluster/kubeshark/default.nix diff --git a/pkgs/applications/networking/cluster/kubeshark/default.nix b/pkgs/applications/networking/cluster/kubeshark/default.nix new file mode 100644 index 00000000000..c7abd03ccd7 --- /dev/null +++ b/pkgs/applications/networking/cluster/kubeshark/default.nix @@ -0,0 +1,60 @@ +{ stdenv, lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, kubeshark, nix-update-script }: + +buildGoModule rec { + pname = "kubeshark"; + version = "38.5"; + + src = fetchFromGitHub { + owner = "kubeshark"; + repo = "kubeshark"; + rev = version; + sha256 = "sha256-xu+IcmYNsFBYhb0Grnqyi31LCG/3XhSh1LH8XakQ3Yk="; + }; + + vendorHash = "sha256-o04XIUsHNqOBkvcejASHNz1HDnV6F9t+Q2Hg8eL/Uoc="; + + ldflags = let t = "github.com/kubeshark/kubeshark"; in [ + "-s" "-w" + "-X ${t}/misc.GitCommitHash=${src.rev}" + "-X ${t}/misc.Branch=master" + "-X ${t}/misc.BuildTimestamp=0" + "-X ${t}/misc.Platform=unknown" + "-X ${t}/misc.Ver=${version}" + ]; + + nativeBuildInputs = [ installShellFiles ]; + + checkPhase = '' + go test ./... + ''; + doCheck = true; + + postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' + installShellCompletion --cmd kubeshark \ + --bash <($out/bin/kubeshark completion bash) \ + --fish <($out/bin/kubeshark completion fish) \ + --zsh <($out/bin/kubeshark completion zsh) + ''; + + passthru = { + tests.version = testers.testVersion { + package = kubeshark; + command = "kubeshark version"; + inherit version; + }; + updateScript = nix-update-script { }; + }; + + meta = with lib; { + changelog = "https://github.com/kubeshark/kubeshark/releases/tag/${version}"; + description = "The API Traffic Viewer for Kubernetes"; + homepage = "https://kubeshark.co/"; + license = licenses.asl20; + longDescription = '' + The API traffic viewer for Kubernetes providing real-time, protocol-aware visibility into Kubernetes’ internal network, + Think TCPDump and Wireshark re-invented for Kubernetes + capturing, dissecting and monitoring all traffic and payloads going in, out and across containers, pods, nodes and clusters. + ''; + maintainers = with maintainers; [ bryanasdev000 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2ca57f83d83..1e09e237e2e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8843,6 +8843,8 @@ with pkgs; kubepug = callPackage ../development/tools/kubepug { }; + kubeshark = callPackage ../applications/networking/cluster/kubeshark { }; + kubergrunt = callPackage ../applications/networking/cluster/kubergrunt { }; kubo = callPackage ../applications/networking/kubo { }; From 6d97ba09cb9e10d0c652b405a9946636cb79bb42 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 18 Feb 2023 08:40:15 +0000 Subject: [PATCH 25/36] libsForQt5.qtstyleplugin-kvantum: 1.0.7 -> 1.0.9 --- pkgs/development/libraries/qtstyleplugin-kvantum/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix b/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix index f50f47413b4..4d0cbafe373 100644 --- a/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix +++ b/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix @@ -16,13 +16,13 @@ stdenv.mkDerivation rec { pname = "qtstyleplugin-kvantum"; - version = "1.0.7"; + version = "1.0.9"; src = fetchFromGitHub { owner = "tsujan"; repo = "Kvantum"; rev = "V${version}"; - sha256 = "Ys77z5BoeQEOYe1h5ITEuVtVn6Uug9zQjrCBxLQOrSs="; + sha256 = "5/cScJpi5Z5Z/SjizKfMTGytuEo2uUT6QtpMnn7JhKc="; }; nativeBuildInputs = [ From ef56f34e07c157e5b9b694c0be2c8d2125239cb3 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Fri, 17 Feb 2023 16:34:00 +0100 Subject: [PATCH 26/36] opensnitch: Fix build by sticking with Go 1.18 --- pkgs/top-level/all-packages.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8670703eaa0..d9eabc7f24e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10361,7 +10361,11 @@ with pkgs; openfortivpn = callPackage ../tools/networking/openfortivpn { }; - opensnitch = callPackage ../tools/networking/opensnitch/daemon.nix { }; + opensnitch = callPackage ../tools/networking/opensnitch/daemon.nix { + # Build currently fails on Go > 1.18 + # See https://github.com/evilsocket/opensnitch/issues/851 + buildGoModule = buildGo118Module; + }; opensnitch-ui = libsForQt5.callPackage ../tools/networking/opensnitch/ui.nix { }; From e1f1c7eb79fefa5e640bfbc9e023619ef095935a Mon Sep 17 00:00:00 2001 From: Yureka Date: Sat, 18 Feb 2023 11:33:13 +0100 Subject: [PATCH 27/36] Revert "setup-hooks/reproducible-builds.sh: NIX_OUTPATH_USED_AS_RANDOM_SEED" (#216935) This is a stdenv rebuild and should have gone to staging --- pkgs/build-support/setup-hooks/reproducible-builds.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/build-support/setup-hooks/reproducible-builds.sh b/pkgs/build-support/setup-hooks/reproducible-builds.sh index 5e27ce8a25f..7b52f84df67 100644 --- a/pkgs/build-support/setup-hooks/reproducible-builds.sh +++ b/pkgs/build-support/setup-hooks/reproducible-builds.sh @@ -3,8 +3,7 @@ # derivation and not easily collide with other builds. # We also truncate the hash so that it cannot cause reference cycles. NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE:-} -frandom-seed=$( - randSeed=${NIX_OUTPATH_USED_AS_RANDOM_SEED:-$out} - outbase="${randSeed##*/}" + outbase="${out##*/}" randomseed="${outbase:0:10}" echo $randomseed )" From 6d3b26f1542d214017783a4cfbcb369eaa0cd6b4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 18 Feb 2023 03:06:09 +0000 Subject: [PATCH 28/36] =?UTF-8?q?terraform-providers.azuread:=202.34.0=20?= =?UTF-8?q?=E2=86=92=202.34.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index 76647ede165..fb2824410f0 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -119,11 +119,11 @@ "vendorHash": "sha256-WndEg+n0hId7R35OeHamP+OxzzRee7f+qXIhWmos8WI=" }, "azuread": { - "hash": "sha256-StoT7ujiJhEMpQ4wMN/qzILFxJ18ZkgLkY56LwxKY+Y=", + "hash": "sha256-CTiYxmH39Jjh7wGKWmH0EoQa1H1bkV9hBNeHR+WVvF0=", "homepage": "https://registry.terraform.io/providers/hashicorp/azuread", "owner": "hashicorp", "repo": "terraform-provider-azuread", - "rev": "v2.34.0", + "rev": "v2.34.1", "spdx": "MPL-2.0", "vendorHash": null }, From e26cbd73d3a57e6751603168e6839dedef97ceac Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 18 Feb 2023 03:09:43 +0000 Subject: [PATCH 29/36] =?UTF-8?q?terraform-providers.github:=205.17.0=20?= =?UTF-8?q?=E2=86=92=205.18.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index fb2824410f0..bda33a8a0bc 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -420,11 +420,11 @@ "vendorHash": "sha256-uWTY8cFztXFrQQ7GW6/R+x9M6vHmsb934ldq+oeW5vk=" }, "github": { - "hash": "sha256-QobAIpDDl5SXG9hmpdq8lDm8Sg5w2oK4A+e8WKw52Cc=", + "hash": "sha256-GieysqBcXSgHuT13FqDtPPklFPRBREwMrTZZ7QH14pY=", "homepage": "https://registry.terraform.io/providers/integrations/github", "owner": "integrations", "repo": "terraform-provider-github", - "rev": "v5.17.0", + "rev": "v5.18.0", "spdx": "MIT", "vendorHash": null }, From 29b571a5053025e884c2fb6b2803d6d09bf07159 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 18 Feb 2023 03:13:23 +0000 Subject: [PATCH 30/36] =?UTF-8?q?terraform-providers.huaweicloud:=201.44.1?= =?UTF-8?q?=20=E2=86=92=201.44.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index bda33a8a0bc..abbccf73baf 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -540,11 +540,11 @@ "vendorHash": "sha256-rxh8Me+eOKPCbfHFT3tRsbM7JU67dBqv2JOiWArI/2Y=" }, "huaweicloud": { - "hash": "sha256-8H9DgpZukJ6K78H6YITPgWai8lPPb8O1tITRTl/azHw=", + "hash": "sha256-oZUPfhndpht9EuBiltLknblGaMX2M/dD1iOiwDJKgWY=", "homepage": "https://registry.terraform.io/providers/huaweicloud/huaweicloud", "owner": "huaweicloud", "repo": "terraform-provider-huaweicloud", - "rev": "v1.44.1", + "rev": "v1.44.2", "spdx": "MPL-2.0", "vendorHash": null }, From 28f6883dd5a1ba48c54224d6c23947927e9b8f35 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 18 Feb 2023 03:16:30 +0000 Subject: [PATCH 31/36] =?UTF-8?q?terraform-providers.azurerm:=203.44.0=20?= =?UTF-8?q?=E2=86=92=203.44.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index abbccf73baf..c932630d5d3 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -128,11 +128,11 @@ "vendorHash": null }, "azurerm": { - "hash": "sha256-40oarnfSdA2Sif40C1gi+SupY4bNsp78TBfgNDCFf7U=", + "hash": "sha256-FPgq/BsciisMhdSYsYiHnMQJFaTAa/llQ1RVS/sOzhQ=", "homepage": "https://registry.terraform.io/providers/hashicorp/azurerm", "owner": "hashicorp", "repo": "terraform-provider-azurerm", - "rev": "v3.44.0", + "rev": "v3.44.1", "spdx": "MPL-2.0", "vendorHash": null }, From 5f4e07deb7c44f27d498f8df9c5f34750acf52d2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 18 Feb 2023 03:19:31 +0000 Subject: [PATCH 32/36] =?UTF-8?q?terraform-providers.vault:=203.12.0=20?= =?UTF-8?q?=E2=86=92=203.13.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index c932630d5d3..8a28228a3c0 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -1172,12 +1172,12 @@ "vendorHash": "sha256-yTcroKTdYv0O8cX80A451I1vjYclVjA8P69fsb0wY/U=" }, "vault": { - "hash": "sha256-aNyCUDV1yjpmbPNYlxuJNaiXtG3fJySxRsDLJx/hZ04=", + "hash": "sha256-cYSw5aN7TvVMUY+YnyyosB4HjiosXYB7kDiNDQ258Eg=", "homepage": "https://registry.terraform.io/providers/hashicorp/vault", "owner": "hashicorp", "proxyVendor": true, "repo": "terraform-provider-vault", - "rev": "v3.12.0", + "rev": "v3.13.0", "spdx": "MPL-2.0", "vendorHash": "sha256-EOBNoEW9GI21IgXSiEN93B3skxfCrBkNwLxGXaso1oE=" }, From 81cf17325659b5f4526fa0d50ac7b403558106a3 Mon Sep 17 00:00:00 2001 From: pennae Date: Mon, 13 Feb 2023 13:43:32 +0100 Subject: [PATCH 33/36] nixos-render-docs: use multiprocessing for options options processing is pretty slow right now, mostly because the markdown-it-py parser is pure python (and with performance pessimizations at that). options parsing *is* embarassingly parallel though, so we can just fork out all the work to worker processes and collect the results. multiprocessing probably has a greater benefit on linux than on darwin since the worker spawning method darwin uses is less efficient than fork() on linux. this hasn't been tested on darwin, only on linux, but if anything darwin will be faster with its preferred method. --- nixos/doc/manual/default.nix | 4 +- nixos/lib/make-options-doc/default.nix | 2 +- .../src/nixos_render_docs/__init__.py | 3 + .../src/nixos_render_docs/options.py | 45 ++++++++++++-- .../src/nixos_render_docs/parallel.py | 58 +++++++++++++++++++ 5 files changed, 105 insertions(+), 7 deletions(-) create mode 100644 pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/parallel.py diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index 8c71e510879..714b3efca20 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -158,7 +158,7 @@ let '@NIXOS_TEST_OPTIONS_JSON@' \ ${testOptionsDoc.optionsJSON}/share/doc/nixos/options.json - nixos-render-docs manual docbook \ + nixos-render-docs -j $NIX_BUILD_CORES manual docbook \ --manpage-urls ${manpageUrls} \ --revision ${lib.escapeShellArg revision} \ ./manual.md \ @@ -285,7 +285,7 @@ in rec { '' else '' mkdir -p $out/share/man/man5 - nixos-render-docs options manpage \ + nixos-render-docs -j $NIX_BUILD_CORES options manpage \ --revision ${lib.escapeShellArg revision} \ ${optionsJSON}/share/doc/nixos/options.json \ $out/share/man/man5/configuration.nix.5 diff --git a/nixos/lib/make-options-doc/default.nix b/nixos/lib/make-options-doc/default.nix index 09b0191d2bb..50fb9ede08d 100644 --- a/nixos/lib/make-options-doc/default.nix +++ b/nixos/lib/make-options-doc/default.nix @@ -152,7 +152,7 @@ in rec { pkgs.nixos-render-docs ]; } '' - nixos-render-docs options docbook \ + nixos-render-docs -j $NIX_BUILD_CORES options docbook \ --manpage-urls ${pkgs.path + "/doc/manpage-urls.json"} \ --revision ${lib.escapeShellArg revision} \ --document-type ${lib.escapeShellArg documentType} \ diff --git a/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/__init__.py b/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/__init__.py index 56b68ba27a5..1c58accb416 100644 --- a/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/__init__.py +++ b/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/__init__.py @@ -10,6 +10,7 @@ from typing import Any, Dict from .md import Converter from . import manual from . import options +from . import parallel def pretty_print_exc(e: BaseException, *, _desc_text: str = "error") -> None: print(f"\x1b[1;31m{_desc_text}:\x1b[0m", file=sys.stderr) @@ -35,6 +36,7 @@ def pretty_print_exc(e: BaseException, *, _desc_text: str = "error") -> None: def main() -> None: parser = argparse.ArgumentParser(description='render nixos manual bits') + parser.add_argument('-j', '--jobs', type=int, default=None) commands = parser.add_subparsers(dest='command', required=True) @@ -43,6 +45,7 @@ def main() -> None: args = parser.parse_args() try: + parallel.pool_processes = args.jobs if args.command == 'options': options.run_cli(args) elif args.command == 'manual': diff --git a/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/options.py b/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/options.py index 3cba36140bb..8282d749324 100644 --- a/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/options.py +++ b/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/options.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import argparse import json @@ -10,6 +12,7 @@ from xml.sax.saxutils import escape, quoteattr import markdown_it +from . import parallel from .docbook import DocBookRenderer, make_xml_id from .manpage import ManpageRenderer, man_escape from .md import Converter, md_escape @@ -148,15 +151,33 @@ class BaseConverter(Converter): return [ l for part in blocks for l in part ] + # this could return a TState parameter, but that does not allow dependent types and + # will cause headaches when using BaseConverter as a type bound anywhere. Any is the + # next best thing we can use, and since this is internal it will be mostly safe. + @abstractmethod + def _parallel_render_prepare(self) -> Any: raise NotImplementedError() + # this should return python 3.11's Self instead to ensure that a prepare+finish + # round-trip ends up with an object of the same type. for now we'll use BaseConverter + # since it's good enough so far. + @classmethod + @abstractmethod + def _parallel_render_init_worker(cls, a: Any) -> BaseConverter: raise NotImplementedError() + def _render_option(self, name: str, option: dict[str, Any]) -> RenderedOption: try: return RenderedOption(option['loc'], self._convert_one(option)) except Exception as e: raise Exception(f"Failed to render option {name}") from e + @classmethod + def _parallel_render_step(cls, s: BaseConverter, a: Any) -> RenderedOption: + return s._render_option(*a) + def add_options(self, options: dict[str, Any]) -> None: - for (name, option) in options.items(): - self._options[name] = self._render_option(name, option) + mapped = parallel.map(self._parallel_render_step, options.items(), 100, + self._parallel_render_init_worker, self._parallel_render_prepare()) + for (name, option) in zip(options.keys(), mapped): + self._options[name] = option @abstractmethod def finalize(self) -> str: raise NotImplementedError() @@ -194,6 +215,13 @@ class DocBookConverter(BaseConverter): self._varlist_id = varlist_id self._id_prefix = id_prefix + def _parallel_render_prepare(self) -> Any: + return (self._manpage_urls, self._revision, self._markdown_by_default, self._document_type, + self._varlist_id, self._id_prefix) + @classmethod + def _parallel_render_init_worker(cls, a: Any) -> DocBookConverter: + return cls(*a) + def _render_code(self, option: dict[str, Any], key: str) -> list[str]: if lit := option_is(option, key, 'literalDocBook'): return [ f"{key.capitalize()}: {lit['text']}" ] @@ -283,10 +311,19 @@ class ManpageConverter(BaseConverter): _options_by_id: dict[str, str] _links_in_last_description: Optional[list[str]] = None - def __init__(self, revision: str, markdown_by_default: bool): - self._options_by_id = {} + def __init__(self, revision: str, markdown_by_default: bool, + *, + # only for parallel rendering + _options_by_id: Optional[dict[str, str]] = None): + self._options_by_id = _options_by_id or {} super().__init__({}, revision, markdown_by_default) + def _parallel_render_prepare(self) -> Any: + return ((self._revision, self._markdown_by_default), { '_options_by_id': self._options_by_id }) + @classmethod + def _parallel_render_init_worker(cls, a: Any) -> ManpageConverter: + return cls(*a[0], **a[1]) + def _render_option(self, name: str, option: dict[str, Any]) -> RenderedOption: assert isinstance(self._md.renderer, OptionsManpageRenderer) links = self._md.renderer.link_footnotes = [] diff --git a/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/parallel.py b/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/parallel.py new file mode 100644 index 00000000000..c968d3a1322 --- /dev/null +++ b/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/parallel.py @@ -0,0 +1,58 @@ +# this module only has to exist because cpython has a global interpreter lock +# and markdown-it is pure python code. ideally we'd just use thread pools, but +# the GIL prohibits this. + +import multiprocessing + +from typing import Any, Callable, ClassVar, Iterable, Optional, TypeVar + +R = TypeVar('R') +S = TypeVar('S') +T = TypeVar('T') +A = TypeVar('A') + +pool_processes: Optional[int] = None + +# this thing is impossible to type because there's so much global state involved. +# wrapping in a class to get access to Generic[] parameters is not sufficient +# because mypy is too weak, and unnecessarily obscures how much global state is +# needed in each worker to make this whole brouhaha work. +_map_worker_fn: Any = None +_map_worker_state_fn: Any = None +_map_worker_state_arg: Any = None + +def _map_worker_init(*args: Any) -> None: + global _map_worker_fn, _map_worker_state_fn, _map_worker_state_arg + (_map_worker_fn, _map_worker_state_fn, _map_worker_state_arg) = args + +# NOTE: the state argument is never passed by any caller, we only use it as a localized +# cache for the created state in lieu of another global. it is effectively a global though. +def _map_worker_step(arg: Any, state: Any = []) -> Any: + global _map_worker_fn, _map_worker_state_fn, _map_worker_state_arg + # if a Pool initializer throws it'll just be retried, leading to endless loops. + # doing the proper initialization only on first use avoids this. + if not state: + state.append(_map_worker_state_fn(_map_worker_state_arg)) + return _map_worker_fn(state[0], arg) + +def map(fn: Callable[[S, T], R], d: Iterable[T], chunk_size: int, + state_fn: Callable[[A], S], state_arg: A) -> list[R]: + """ + `[ fn(state, i) for i in d ]` where `state = state_fn(state_arg)`, but using multiprocessing + if `pool_processes` is not `None`. when using multiprocessing is used the state function will + be run once in ever worker process and `multiprocessing.Pool.imap` will be used. + + **NOTE:** neither `state_fn` nor `fn` are allowed to mutate global state! doing so will cause + discrepancies if `pool_processes` is not None, since each worker will have its own copy. + + **NOTE**: all data types that potentially cross a process boundary (so, all of them) must be + pickle-able. this excludes lambdas, bound functions, local functions, and a number of other + types depending on their exact internal structure. *theoretically* the pool constructor + can transfer non-pickleable data to worker processes, but this only works when using the + `fork` spawn method (and is thus not available on darwin or windows). + """ + if pool_processes is None: + state = state_fn(state_arg) + return [ fn(state, i) for i in d ] + with multiprocessing.Pool(pool_processes, _map_worker_init, (fn, state_fn, state_arg)) as p: + return list(p.imap(_map_worker_step, d, chunk_size)) From b965765e5d025980f78e7d1329aecc103bcf496b Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 12 Feb 2023 08:07:33 +0100 Subject: [PATCH 34/36] =?UTF-8?q?ocamlPackages.netchannel:=202.1.1=20?= =?UTF-8?q?=E2=86=92=202.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/mirage-net-xen/default.nix | 2 ++ pkgs/development/ocaml-modules/netchannel/default.nix | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/mirage-net-xen/default.nix b/pkgs/development/ocaml-modules/mirage-net-xen/default.nix index 49a00747cfa..e03e17905fa 100644 --- a/pkgs/development/ocaml-modules/mirage-net-xen/default.nix +++ b/pkgs/development/ocaml-modules/mirage-net-xen/default.nix @@ -20,6 +20,8 @@ buildDunePackage { meta ; + duneVersion = "3"; + nativeBuildInputs = [ ppx_sexp_conv ]; diff --git a/pkgs/development/ocaml-modules/netchannel/default.nix b/pkgs/development/ocaml-modules/netchannel/default.nix index ce859d366b0..8b0dbec3927 100644 --- a/pkgs/development/ocaml-modules/netchannel/default.nix +++ b/pkgs/development/ocaml-modules/netchannel/default.nix @@ -19,13 +19,14 @@ buildDunePackage rec { pname = "netchannel"; - version = "2.1.1"; + version = "2.1.2"; minimalOCamlVersion = "4.08"; + duneVersion = "3"; src = fetchurl { url = "https://github.com/mirage/mirage-net-xen/releases/download/v${version}/mirage-net-xen-${version}.tbz"; - sha256 = "sha256-kYsAf6ntwWKUp26dMcp5BScdUOaGpM46050jVZe6gfs="; + hash = "sha256-lTmwcNKiaq5EdJdM4UaaAVdZ+hTCX5U9MPKY/r3i7fw="; }; buildInputs = [ From aea640a73bc8025b9e7b8e12fe3f29fd3b504cd1 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 17 Feb 2023 19:42:37 +0000 Subject: [PATCH 35/36] buildGraalvmNativeImage: allow overriding attributes Remove the previous function closure, that would make it difficult to access the inner derivation attributes. Fix issue #216787. --- .../build-graalvm-native-image/default.nix | 32 ++++++++++++------- pkgs/top-level/all-packages.nix | 4 ++- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/pkgs/build-support/build-graalvm-native-image/default.nix b/pkgs/build-support/build-graalvm-native-image/default.nix index 810ef52235e..3bf675b5d20 100644 --- a/pkgs/build-support/build-graalvm-native-image/default.nix +++ b/pkgs/build-support/build-graalvm-native-image/default.nix @@ -1,7 +1,9 @@ -{ lib, stdenv, graalvm-ce, glibcLocales }: - -{ name ? "${args.pname}-${args.version}" - # Final executable name +{ lib +, stdenv +, glibcLocales + # The GraalVM derivation to use +, graalvmDrv +, name ? "${args.pname}-${args.version}" , executable ? args.pname # JAR used as input for GraalVM derivation, defaults to src , jar ? args.src @@ -9,7 +11,6 @@ # Default native-image arguments. You probably don't want to set this, # except in special cases. In most cases, use extraNativeBuildArgs instead , nativeImageBuildArgs ? [ - "-jar" jar (lib.optionalString stdenv.isDarwin "-H:-CheckToolchain") "-H:Name=${executable}" "--verbose" @@ -18,16 +19,25 @@ , extraNativeImageBuildArgs ? [ ] # XMX size of GraalVM during build , graalvmXmx ? "-J-Xmx6g" - # The GraalVM derivation to use -, graalvmDrv ? graalvm-ce # Locale to be used by GraalVM compiler , LC_ALL ? "en_US.UTF-8" , meta ? { } , ... } @ args: -stdenv.mkDerivation (args // { - inherit dontUnpack LC_ALL; +let + extraArgs = builtins.removeAttrs args [ + "lib" + "stdenv" + "glibcLocales" + "jar" + "dontUnpack" + "LC_ALL" + "meta" + ]; +in +stdenv.mkDerivation ({ + inherit dontUnpack LC_ALL jar; nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ graalvmDrv glibcLocales ]; @@ -36,7 +46,7 @@ stdenv.mkDerivation (args // { buildPhase = args.buildPhase or '' runHook preBuild - native-image ''${nativeImageBuildArgs[@]} + native-image -jar "$jar" ''${nativeImageBuildArgs[@]} runHook postBuild ''; @@ -61,4 +71,4 @@ stdenv.mkDerivation (args // { # need to have native-image-installable-svm available broken = !(builtins.any (p: (p.product or "") == "native-image-installable-svm") graalvmDrv.products); } // meta; -}) +} // extraArgs) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8e691cacef6..9aa5f1e11a4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15037,7 +15037,9 @@ with pkgs; graalvm-ce = graalvm11-ce; graalvm11-ce = graalvmCEPackages.graalvm11-ce; graalvm17-ce = graalvmCEPackages.graalvm17-ce; - buildGraalvmNativeImage = callPackage ../build-support/build-graalvm-native-image { }; + buildGraalvmNativeImage = (callPackage ../build-support/build-graalvm-native-image { + graalvmDrv = graalvm-ce; + }).override; openshot-qt = libsForQt5.callPackage ../applications/video/openshot-qt { }; From 805ba10ecbfbd617fad87d90d5169e798c9e935f Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 18 Feb 2023 14:03:10 +0000 Subject: [PATCH 36/36] Revert "libvisual: disable building examples when cross compiling" This reverts commit 11b095e8805aa123a4d77a5e706bebaf86622879. We have a better fix (fa0633e) in staging-next, which I'm about to merge into. --- pkgs/development/libraries/libvisual/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkgs/development/libraries/libvisual/default.nix b/pkgs/development/libraries/libvisual/default.nix index b58c25401c9..d7bf28a94e4 100644 --- a/pkgs/development/libraries/libvisual/default.nix +++ b/pkgs/development/libraries/libvisual/default.nix @@ -4,8 +4,6 @@ , SDL , glib , pkg-config - # sdl-config is not available when crossing -, withExamples ? stdenv.buildPlatform == stdenv.hostPlatform }: stdenv.mkDerivation rec { @@ -18,9 +16,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = lib.optional withExamples SDL ++ [ glib ]; - - configureFlags = lib.optional (!withExamples) "--disable-examples"; + buildInputs = [ SDL glib ]; meta = { description = "An abstraction library for audio visualisations";