From d1c8a07d3ff80376ba2055d77734d9a39abd90d2 Mon Sep 17 00:00:00 2001 From: Andrey Voronkov Date: Fri, 26 Jan 2024 06:56:48 +0300 Subject: [PATCH 01/40] mattermost-desktop 5.5.0 -> 5.6.0 Signed-off-by: Andrey Voronkov --- .../instant-messengers/mattermost-desktop/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix b/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix index 56bc542d4206..046c3344b97b 100644 --- a/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix @@ -1,24 +1,24 @@ { lib , stdenv , fetchurl -, electron_26 +, electron_28 , makeWrapper }: let pname = "mattermost-desktop"; - version = "5.5.1"; + version = "5.6.0"; srcs = { "x86_64-linux" = { url = "https://releases.mattermost.com/desktop/${version}/${pname}-${version}-linux-x64.tar.gz"; - hash = "sha256-bRiO5gYM7nrnkbHBP3B9zAK2YV5POkc3stEsbZJ48VA="; + hash = "sha256-KUF/zH18X+RS8AICBv53JTBpcaokzo92psyoQNmLF/Q="; }; "aarch64-linux" = { url = "https://releases.mattermost.com/desktop/${version}/${pname}-${version}-linux-arm64.tar.gz"; - hash = "sha256-Z4U6Jbwasra69QPHJ9/7WwMSxh0O9r4QIe/xC3WRf4w="; + hash = "sha256-Zl5PalAles39qSMtt1cytfu4Mheud4+8TTkt7Ohdf/o="; }; }; @@ -52,7 +52,7 @@ stdenv.mkDerivation { substituteInPlace $out/share/applications/Mattermost.desktop \ --replace /share/mattermost-desktop/mattermost-desktop /bin/mattermost-desktop - makeWrapper ${electron_26}/bin/electron $out/bin/${pname} \ + makeWrapper ${electron_28}/bin/electron $out/bin/${pname} \ --add-flags $out/share/${pname}/app.asar runHook postInstall From 1f09eb4d9e8d52d56ce3a77e14143af3efc4bdbb Mon Sep 17 00:00:00 2001 From: Kiskae Date: Fri, 2 Feb 2024 20:40:17 +0100 Subject: [PATCH 02/40] electron_*-bin: fix libGL --- pkgs/development/tools/electron/binary/generic.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/electron/binary/generic.nix b/pkgs/development/tools/electron/binary/generic.nix index 8f726b410000..daa0c81d2e05 100644 --- a/pkgs/development/tools/electron/binary/generic.nix +++ b/pkgs/development/tools/electron/binary/generic.nix @@ -12,7 +12,7 @@ , mesa , libxkbcommon , libxshmfence -, libglvnd +, libGL , alsa-lib , cairo , cups @@ -102,7 +102,7 @@ let ++ lib.optionals (lib.versionOlder version "10.0.0") [ libXScrnSaver ] ++ lib.optionals (lib.versionAtLeast version "11.0.0") [ libxkbcommon ] ++ lib.optionals (lib.versionAtLeast version "12.0.0") [ libxshmfence ] - ++ lib.optionals (lib.versionAtLeast version "17.0.0") [ libglvnd ] + ++ lib.optionals (lib.versionAtLeast version "17.0.0") [ libGL ] ); linux = { @@ -130,6 +130,11 @@ let --set-rpath "${electronLibPath}:$out/libexec/electron" \ $out/libexec/electron/.electron-wrapped \ ${lib.optionalString (lib.versionAtLeast version "15.0.0") "$out/libexec/electron/.chrome_crashpad_handler-wrapped" } + + # patch libANGLE + patchelf \ + --set-rpath "${lib.makeLibraryPath [ libGL pciutils ]}" \ + $out/libexec/electron/lib*GL* ''; }; From 6cb1c2d5ac78d9af80606cadf351681d17f6979f Mon Sep 17 00:00:00 2001 From: Andrey Voronkov Date: Sat, 3 Feb 2024 15:31:21 +0300 Subject: [PATCH 03/40] Use same major version of electron which mattermost-desktop uses itself; find electron binary via lib.getExe --- .../instant-messengers/mattermost-desktop/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix b/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix index 046c3344b97b..7b9246300c06 100644 --- a/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix @@ -1,7 +1,7 @@ { lib , stdenv , fetchurl -, electron_28 +, electron_27 , makeWrapper }: @@ -52,7 +52,7 @@ stdenv.mkDerivation { substituteInPlace $out/share/applications/Mattermost.desktop \ --replace /share/mattermost-desktop/mattermost-desktop /bin/mattermost-desktop - makeWrapper ${electron_28}/bin/electron $out/bin/${pname} \ + makeWrapper '${lib.getExe electron_27}' $out/bin/${pname} \ --add-flags $out/share/${pname}/app.asar runHook postInstall From e456032addae76701eb17e6c03fc515fd78ad74f Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Wed, 3 Jan 2024 17:41:57 +0100 Subject: [PATCH 04/40] nixos/flake: put nixpkgs in NIX_PATH and system registry for flake configs Currently there are a bunch of really wacky hacks required to get nixpkgs path correctly set up under flake configs such that `nix run nixpkgs#hello` and `nix run -f '' hello` hit the nixpkgs that the system was built with. In particular you have to use specialArgs or an anonymous module, and everyone has to include this hack in their own configs. We can do this for users automatically. I have tested these manually with a basic config; I don't know if it is even possible to write a nixos test for it since you can't really get a string-with-context to yourself unless you are in a flake context. --- flake.nix | 14 ++- .../manual/release-notes/rl-2405.section.md | 8 ++ nixos/modules/misc/nixpkgs-flake.nix | 105 ++++++++++++++++++ nixos/modules/module-list.nix | 1 + 4 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 nixos/modules/misc/nixpkgs-flake.nix diff --git a/flake.nix b/flake.nix index 580f572ff32c..d920d5d0ddda 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,19 @@ # We set it to null, to remove the "legacy" entrypoint's # non-hermetic default. system = null; - } // args + + modules = args.modules ++ [ + # This module is injected here since it exposes the nixpkgs self-path in as + # constrained of contexts as possible to avoid more things depending on it and + # introducing unnecessary potential fragility to changes in flakes itself. + # + # See: failed attempt to make pkgs.path not copy when using flakes: + # https://github.com/NixOS/nixpkgs/pull/153594#issuecomment-1023287913 + ({ config, pkgs, lib, ... }: { + config.nixpkgs.flake.source = self.outPath; + }) + ]; + } // builtins.removeAttrs args [ "modules" ] ); }); diff --git a/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md index f423311620d9..6a6903f5ce9a 100644 --- a/nixos/doc/manual/release-notes/rl-2405.section.md +++ b/nixos/doc/manual/release-notes/rl-2405.section.md @@ -14,6 +14,14 @@ In addition to numerous new and upgraded packages, this release has the followin - This can be disabled through the `environment.stub-ld.enable` option. - If you use `programs.nix-ld.enable`, no changes are needed. The stub will be disabled automatically. +- On flake-based NixOS configurations using `nixpkgs.lib.nixosSystem`, NixOS will automatically set `NIX_PATH` and the system-wide flake registry (`/etc/nix/registry.json`) to point `` and the unqualified flake path `nixpkgs` to the version of nixpkgs used to build the system. + + This makes `nix run nixpkgs#hello` and `nix-build '' -A hello` work out of the box with no added configuration, reusing dependencies already on the system. + + This may be undesirable if nix commands are not going to be run on the built system since it adds nixpkgs to the system closure. For such closure-size-constrained non-interactive systems, this setting should be disabled. + + To disable this, set [nixpkgs.flake.setNixPath](#opt-nixpkgs.flake.setNixPath) and [nixpkgs.flake.setFlakeRegistry](#opt-nixpkgs.flake.setFlakeRegistry) to false. + - Julia environments can now be built with arbitrary packages from the ecosystem using the `.withPackages` function. For example: `julia.withPackages ["Plots"]`. ## New Services {#sec-release-24.05-new-services} diff --git a/nixos/modules/misc/nixpkgs-flake.nix b/nixos/modules/misc/nixpkgs-flake.nix new file mode 100644 index 000000000000..8bfe05ca1994 --- /dev/null +++ b/nixos/modules/misc/nixpkgs-flake.nix @@ -0,0 +1,105 @@ +{ config, options, lib, pkgs, ... }: + +with lib; + +let + cfg = config.nixpkgs.flake; +in +{ + options.nixpkgs.flake = { + source = mkOption { + # In newer Nix versions, particularly with lazy trees, outPath of + # flakes becomes a Nix-language path object. We deliberately allow this + # to gracefully come through the interface in discussion with @roberth. + # + # See: https://github.com/NixOS/nixpkgs/pull/278522#discussion_r1460292639 + type = types.nullOr (types.either types.str types.path); + + default = null; + defaultText = "if (using nixpkgsFlake.lib.nixosSystem) then self.outPath else null"; + + example = ''builtins.fetchTarball { name = "source"; sha256 = "${lib.fakeHash}"; url = "https://github.com/nixos/nixpkgs/archive/somecommit.tar.gz"; }''; + + description = mdDoc '' + The path to the nixpkgs sources used to build the system. This is automatically set up to be + the store path of the nixpkgs flake used to build the system if using + `nixpkgs.lib.nixosSystem`, and is otherwise null by default. + + This can also be optionally set if the NixOS system is not built with a flake but still uses + pinned sources: set this to the store path for the nixpkgs sources used to build the system, + as may be obtained by `builtins.fetchTarball`, for example. + + Note: the name of the store path must be "source" due to + . + ''; + }; + + setNixPath = mkOption { + type = types.bool; + + default = cfg.source != null; + defaultText = "config.nixpkgs.flake.source != null"; + + description = mdDoc '' + Whether to set {env}`NIX_PATH` to include `nixpkgs=flake:nixpkgs` such that `` + lookups receive the version of nixpkgs that the system was built with, in concert with + {option}`nixpkgs.flake.setFlakeRegistry`. + + This is on by default for NixOS configurations built with flakes. + + This makes {command}`nix-build '' -A hello` work out of the box on flake systems. + + Note that this option makes the NixOS closure depend on the nixpkgs sources, which may add + undesired closure size if the system will not have any nix commands run on it. + ''; + }; + + setFlakeRegistry = mkOption { + type = types.bool; + + default = cfg.source != null; + defaultText = "config.nixpkgs.flake.source != null"; + + description = mdDoc '' + Whether to pin nixpkgs in the system-wide flake registry (`/etc/nix/registry.json`) to the + store path of the sources of nixpkgs used to build the NixOS system. + + This is on by default for NixOS configurations built with flakes. + + This option makes {command}`nix run nixpkgs#hello` reuse dependencies from the system, avoid + refetching nixpkgs, and have a consistent result every time. + + Note that this option makes the NixOS closure depend on the nixpkgs sources, which may add + undesired closure size if the system will not have any nix commands run on it. + ''; + }; + }; + + config = mkIf (cfg.source != null) (mkMerge [ + { + assertions = [ + { + assertion = cfg.setNixPath -> cfg.setFlakeRegistry; + message = '' + Setting `nixpkgs.flake.setNixPath` requires that `nixpkgs.flake.setFlakeRegistry` also + be set, since it is implemented in terms of indirection through the flake registry. + ''; + } + ]; + } + (mkIf cfg.setFlakeRegistry { + nix.registry.nixpkgs.to = mkDefault { + type = "path"; + path = cfg.source; + }; + }) + (mkIf cfg.setNixPath { + # N.B. This does not include nixos-config in NIX_PATH unlike modules/config/nix-channel.nix + # because we would need some kind of evil shim taking the *calling* flake's self path, + # perhaps, to ever make that work (in order to know where the Nix expr for the system came + # from and how to call it). + nix.nixPath = mkDefault ([ "nixpkgs=flake:nixpkgs" ] + ++ optional config.nix.channel.enable "/nix/var/nix/profiles/per-user/root/channels"); + }) + ]); +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 65047bdd110a..750dbcc8652a 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -134,6 +134,7 @@ ./misc/meta.nix ./misc/nixops-autoluks.nix ./misc/nixpkgs.nix + ./misc/nixpkgs-flake.nix ./misc/passthru.nix ./misc/version.nix ./misc/wordlist.nix From d12a6c07bf8c0988d7c78509014c7ed34a8e4ccb Mon Sep 17 00:00:00 2001 From: Yarny0 <41838844+Yarny0@users.noreply.github.com> Date: Fri, 9 Feb 2024 12:04:50 +0100 Subject: [PATCH 05/40] foomatic-db: unstable-2023-09-02 -> unstable-2024-02-09 Adds "Generic PS Printer" and "Generic PDF Printer". --- pkgs/misc/cups/drivers/foomatic-db/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/cups/drivers/foomatic-db/default.nix b/pkgs/misc/cups/drivers/foomatic-db/default.nix index cb8156b0a0a9..b4be3a143604 100644 --- a/pkgs/misc/cups/drivers/foomatic-db/default.nix +++ b/pkgs/misc/cups/drivers/foomatic-db/default.nix @@ -13,15 +13,15 @@ stdenv.mkDerivation rec { pname = "foomatic-db"; - version = "unstable-2023-09-02"; + version = "unstable-2024-02-09"; src = fetchFromGitHub { # there is also a daily snapshot at the `downloadPage`, # but it gets deleted quickly and would provoke 404 errors owner = "OpenPrinting"; repo = "foomatic-db"; - rev = "4e6ab90da63afddee33d80115acb44149d2d292b"; - hash = "sha256-wtDGJUyViiCenCY4zvr0Ia4ecZpoDsDSWwlYYs3YMT8="; + rev = "f8b43644771612f854fecda969440511de784bf0"; + hash = "sha256-8Pui83Z7g5aHBJk46AYeKil/0++I6zcc5S/BWRuy1WM="; }; buildInputs = [ cups cups-filters ghostscript gnused perl ]; From f40fcf45170af3fdd83484f923af0db9a45605c4 Mon Sep 17 00:00:00 2001 From: ardishco <109692107+ardishco-the-great@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:10:39 +0300 Subject: [PATCH 06/40] vinegar: add regregrevert patch for wine 9.0 (stable) --- pkgs/by-name/vi/vinegar/package.nix | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/vi/vinegar/package.nix b/pkgs/by-name/vi/vinegar/package.nix index a20b0ff024ee..08a566a7f87f 100644 --- a/pkgs/by-name/vi/vinegar/package.nix +++ b/pkgs/by-name/vi/vinegar/package.nix @@ -8,22 +8,16 @@ , xorg , wayland , vulkan-headers -, wineWowPackages -, fetchpatch +, wine64Packages }: let - # wine-staging doesn't support overrideAttrs for now - wine = wineWowPackages.stagingFull.overrideDerivation (oldAttrs: { + wine = wine64Packages.stable.overrideDerivation (oldAttrs: { patches = (oldAttrs.patches or [ ]) ++ [ # upstream issue: https://bugs.winehq.org/show_bug.cgi?id=55604 # Here are the currently applied patches for Roblox to run under WINE: - (fetchpatch { - name = "vinegar-wine-segrevert.patch"; - url = "https://raw.githubusercontent.com/flathub/org.vinegarhq.Vinegar/8fc153c492542a522d6cc2dff7d1af0e030a529a/patches/wine/temp.patch"; - hash = "sha256-AnEBBhB8leKP0xCSr6UsQK7CN0NDbwqhe326tJ9dDjc="; - }) + ./patches/segregrevert.mypatch ]; }); in From 2e4fb1a50b7dbac41eeaef18d30423302260bee4 Mon Sep 17 00:00:00 2001 From: ardishco-the-great Date: Fri, 16 Feb 2024 15:58:27 +0300 Subject: [PATCH 07/40] vinegar: added segregrevert.mypatch --- .../vi/vinegar/patches/segregrevert.mypatch | 350 ++++++++++++++++++ 1 file changed, 350 insertions(+) create mode 100644 pkgs/by-name/vi/vinegar/patches/segregrevert.mypatch diff --git a/pkgs/by-name/vi/vinegar/patches/segregrevert.mypatch b/pkgs/by-name/vi/vinegar/patches/segregrevert.mypatch new file mode 100644 index 000000000000..09a38e0aff32 --- /dev/null +++ b/pkgs/by-name/vi/vinegar/patches/segregrevert.mypatch @@ -0,0 +1,350 @@ +diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c +index 2f7715a0a60..66cabfd5e64 100644 +--- a/dlls/ntdll/signal_x86_64.c ++++ b/dlls/ntdll/signal_x86_64.c +@@ -559,6 +559,10 @@ NTSTATUS WINAPI dispatch_exception( EXCEPTION_RECORD *rec, CONTEXT *context ) + context->R12, context->R13, context->R14, context->R15 ); + } + ++ /* Legends of Runeterra depends on having SegDs == SegSs in an exception ++ * handler. */ ++ context->SegDs = context->SegSs; ++ + if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION) + NtContinue( context, FALSE ); + +diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c +index 3c4d6620fe8..cccd62ae8c0 100644 +--- a/dlls/ntdll/tests/exception.c ++++ b/dlls/ntdll/tests/exception.c +@@ -1825,8 +1825,8 @@ static void test_thread_context(void) + ok( context.SegDs == LOWORD(expect.SegDs), "wrong SegDs %08lx/%08lx\n", context.SegDs, expect.SegDs ); + ok( context.SegEs == LOWORD(expect.SegEs), "wrong SegEs %08lx/%08lx\n", context.SegEs, expect.SegEs ); + ok( context.SegFs == LOWORD(expect.SegFs), "wrong SegFs %08lx/%08lx\n", context.SegFs, expect.SegFs ); +- if (LOWORD(expect.SegGs)) ok( context.SegGs == LOWORD(expect.SegGs), "wrong SegGs %08lx/%08lx\n", context.SegGs, expect.SegGs ); +- ok( context.SegSs == LOWORD(expect.SegSs), "wrong SegSs %08lx/%08lx\n", context.SegSs, expect.SegSs ); ++ ok( context.SegGs == LOWORD(expect.SegGs), "wrong SegGs %08lx/%08lx\n", context.SegGs, expect.SegGs ); ++ ok( context.SegSs == LOWORD(expect.SegSs), "wrong SegSs %08lx/%08lx\n", context.SegSs, expect.SegGs ); + + ok( LOWORD(context.FloatSave.ControlWord) == LOWORD(expect.x87_control), + "wrong x87 control word %#lx/%#lx.\n", context.FloatSave.ControlWord, expect.x87_control ); +@@ -3278,9 +3278,9 @@ static DWORD WINAPI handler( EXCEPTION_RECORD *rec, ULONG64 frame, + ok( context->SegSs == ss, "ss %#x does not match %#x\n", context->SegSs, ss ); + ok( context->SegDs == context->SegSs, + "ds %#x does not match ss %#x\n", context->SegDs, context->SegSs ); +- ok( context->SegEs == context->SegSs, ++ todo_wine ok( context->SegEs == context->SegSs, + "es %#x does not match ss %#x\n", context->SegEs, context->SegSs ); +- ok( context->SegGs == context->SegSs, ++ todo_wine ok( context->SegGs == context->SegSs, + "gs %#x does not match ss %#x\n", context->SegGs, context->SegSs ); + todo_wine ok( context->SegFs && context->SegFs != context->SegSs, + "got fs %#x\n", context->SegFs ); +@@ -3618,12 +3618,13 @@ static void test_exceptions(void) + ok( ctx.SegDs == ds, "wrong ds %04x / %04x\n", ctx.SegDs, ds ); + ok( ctx.SegEs == es, "wrong es %04x / %04x\n", ctx.SegEs, es ); + ok( ctx.SegFs == fs, "wrong fs %04x / %04x\n", ctx.SegFs, fs ); +- ok( ctx.SegGs == gs || !gs, "wrong gs %04x / %04x\n", ctx.SegGs, gs ); ++ ok( ctx.SegGs == gs, "wrong gs %04x / %04x\n", ctx.SegGs, gs ); + ok( ctx.SegSs == ss, "wrong ss %04x / %04x\n", ctx.SegSs, ss ); +- ok( ctx.SegDs == ctx.SegSs, "wrong ds %04x / %04x\n", ctx.SegDs, ctx.SegSs ); +- ok( ctx.SegEs == ctx.SegSs, "wrong es %04x / %04x\n", ctx.SegEs, ctx.SegSs ); ++ todo_wine ok( ctx.SegEs == ctx.SegSs, "wrong es %04x / %04x\n", ctx.SegEs, ctx.SegSs ); + ok( ctx.SegFs != ctx.SegSs, "wrong fs %04x / %04x\n", ctx.SegFs, ctx.SegSs ); +- ok( ctx.SegGs == ctx.SegSs, "wrong gs %04x / %04x\n", ctx.SegGs, ctx.SegSs ); ++ todo_wine ok( ctx.SegGs == ctx.SegSs, "wrong gs %04x / %04x\n", ctx.SegGs, ctx.SegSs ); ++ if (ctx.SegDs == ctx.SegSs) /* FIXME: remove once Wine is fixed */ ++ { + ctx.SegDs = 0; + ctx.SegEs = ctx.SegFs; + ctx.SegFs = ctx.SegSs; +@@ -3639,12 +3640,13 @@ static void test_exceptions(void) + ok( ctx.SegDs == ds, "wrong ds %04x / %04x\n", ctx.SegDs, ds ); + ok( ctx.SegEs == es, "wrong es %04x / %04x\n", ctx.SegEs, es ); + ok( ctx.SegFs == fs, "wrong fs %04x / %04x\n", ctx.SegFs, fs ); +- ok( ctx.SegGs == gs || !gs, "wrong gs %04x / %04x\n", ctx.SegGs, gs ); ++ ok( ctx.SegGs == gs, "wrong gs %04x / %04x\n", ctx.SegGs, gs ); + ok( ctx.SegSs == ss, "wrong ss %04x / %04x\n", ctx.SegSs, ss ); + ok( ctx.SegDs == ctx.SegSs, "wrong ds %04x / %04x\n", ctx.SegDs, ctx.SegSs ); + ok( ctx.SegEs == ctx.SegSs, "wrong es %04x / %04x\n", ctx.SegEs, ctx.SegSs ); + ok( ctx.SegFs != ctx.SegSs, "wrong fs %04x / %04x\n", ctx.SegFs, ctx.SegSs ); +- ok( ctx.SegGs == ctx.SegSs, "wrong gs %04x / %04x\n", ctx.SegGs, ctx.SegSs ); ++ todo_wine ok( ctx.SegGs == ctx.SegSs, "wrong gs %04x / %04x\n", ctx.SegGs, ctx.SegSs ); ++ } + } + + static DWORD WINAPI simd_fault_handler( EXCEPTION_RECORD *rec, ULONG64 frame, +@@ -4403,7 +4405,7 @@ static void test_thread_context(void) + COMPARE( SegDs ); + COMPARE( SegEs ); + COMPARE( SegFs ); +- if (expect.SegGs) COMPARE( SegGs ); ++ COMPARE( SegGs ); + COMPARE( SegSs ); + + /* AMD CPUs don't save the opcode or data pointer if no exception is +diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c +index 53827629af4..526885221b3 100644 +--- a/dlls/ntdll/unix/signal_x86_64.c ++++ b/dlls/ntdll/unix/signal_x86_64.c +@@ -413,16 +413,20 @@ struct syscall_frame + ULONG64 r14; /* 0060 */ + ULONG64 r15; /* 0068 */ + ULONG64 rip; /* 0070 */ +- ULONG64 cs; /* 0078 */ ++ WORD cs; /* 0078 */ ++ WORD ds; /* 007a */ ++ WORD es; /* 007c */ ++ WORD fs; /* 007e */ + ULONG64 eflags; /* 0080 */ + ULONG64 rsp; /* 0088 */ +- ULONG64 ss; /* 0090 */ ++ WORD ss; /* 0090 */ ++ WORD gs; /* 0092 */ ++ DWORD restore_flags; /* 0094 */ + ULONG64 rbp; /* 0098 */ + struct syscall_frame *prev_frame; /* 00a0 */ + void *syscall_cfa; /* 00a8 */ + DWORD syscall_flags; /* 00b0 */ +- DWORD restore_flags; /* 00b4 */ +- DWORD align[2]; /* 00b8 */ ++ DWORD align[3]; /* 00b4 */ + XMM_SAVE_AREA32 xsave; /* 00c0 */ + DECLSPEC_ALIGN(64) XSTATE xstate; /* 02c0 */ + }; +@@ -809,7 +813,17 @@ static inline void set_sigcontext( const CONTEXT *context, ucontext_t *sigcontex + RIP_sig(sigcontext) = context->Rip; + CS_sig(sigcontext) = context->SegCs; + FS_sig(sigcontext) = context->SegFs; ++ GS_sig(sigcontext) = context->SegGs; + EFL_sig(sigcontext) = context->EFlags; ++ #ifdef DS_sig ++ DS_sig(sigcontext) = context->SegDs; ++ #endif ++ #ifdef ES_sig ++ ES_sig(sigcontext) = context->SegEs; ++ #endif ++ #ifdef SS_sig ++ SS_sig(sigcontext) = context->SegSs; ++ #endif + } + + +@@ -838,16 +852,6 @@ static inline void leave_handler( ucontext_t *sigcontext ) + if (fs32_sel && !is_inside_signal_stack( (void *)RSP_sig(sigcontext )) && !is_inside_syscall(sigcontext)) + __asm__ volatile( "movw %0,%%fs" :: "r" (fs32_sel) ); + #endif +-#ifdef DS_sig +- DS_sig(sigcontext) = ds64_sel; +-#else +- __asm__ volatile( "movw %0,%%ds" :: "r" (ds64_sel) ); +-#endif +-#ifdef ES_sig +- ES_sig(sigcontext) = ds64_sel; +-#else +- __asm__ volatile( "movw %0,%%es" :: "r" (ds64_sel) ); +-#endif + } + + +@@ -880,11 +884,23 @@ static void save_context( struct xcontext *xcontext, const ucontext_t *sigcontex + context->Rip = RIP_sig(sigcontext); + context->SegCs = CS_sig(sigcontext); + context->SegFs = FS_sig(sigcontext); ++ context->SegGs = GS_sig(sigcontext); + context->EFlags = EFL_sig(sigcontext); +- context->SegDs = ds64_sel; +- context->SegEs = ds64_sel; +- context->SegGs = ds64_sel; +- context->SegSs = ds64_sel; ++ #ifdef DS_sig ++ context->SegDs = DS_sig(sigcontext); ++ #else ++ __asm__("movw %%ds,%0" : "=m" (context->SegDs)); ++ #endif ++ #ifdef ES_sig ++ context->SegEs = ES_sig(sigcontext); ++ #else ++ __asm__("movw %%es,%0" : "=m" (context->SegEs)); ++ #endif ++ #ifdef SS_sig ++ context->SegSs = SS_sig(sigcontext); ++ #else ++ __asm__("movw %%ss,%0" : "=m" (context->SegSs)); ++ #endif + context->Dr0 = amd64_thread_data()->dr0; + context->Dr1 = amd64_thread_data()->dr1; + context->Dr2 = amd64_thread_data()->dr2; +@@ -1041,6 +1057,15 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context ) + frame->rbp = context->Rbp; + frame->rip = context->Rip; + frame->eflags = context->EFlags; ++ frame->cs = context->SegCs; ++ frame->ss = context->SegSs; ++ } ++ if (flags & CONTEXT_SEGMENTS) ++ { ++ frame->ds = context->SegDs; ++ frame->es = context->SegEs; ++ frame->fs = context->SegFs; ++ frame->gs = context->SegGs; + } + if (flags & CONTEXT_FLOATING_POINT) + { +@@ -1108,16 +1133,16 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context ) + context->Rbp = frame->rbp; + context->Rip = frame->rip; + context->EFlags = frame->eflags; +- context->SegCs = cs64_sel; +- context->SegSs = ds64_sel; ++ context->SegCs = frame->cs; ++ context->SegSs = frame->ss; + context->ContextFlags |= CONTEXT_CONTROL; + } + if (needed_flags & CONTEXT_SEGMENTS) + { +- context->SegDs = ds64_sel; +- context->SegEs = ds64_sel; +- context->SegFs = amd64_thread_data()->fs; +- context->SegGs = ds64_sel; ++ context->SegDs = frame->ds; ++ context->SegEs = frame->es; ++ context->SegFs = frame->fs; ++ context->SegGs = frame->gs; + context->ContextFlags |= CONTEXT_SEGMENTS; + } + if (needed_flags & CONTEXT_FLOATING_POINT) +@@ -1345,16 +1370,16 @@ NTSTATUS get_thread_wow64_context( HANDLE handle, void *ctx, ULONG size ) + context->Ebp = wow_frame->Ebp; + context->Eip = wow_frame->Eip; + context->EFlags = wow_frame->EFlags; +- context->SegCs = cs32_sel; +- context->SegSs = ds64_sel; ++ context->SegCs = wow_frame->SegCs; ++ context->SegSs = wow_frame->SegSs; + context->ContextFlags |= CONTEXT_I386_CONTROL; + } + if (needed_flags & CONTEXT_I386_SEGMENTS) + { +- context->SegDs = ds64_sel; +- context->SegEs = ds64_sel; +- context->SegFs = amd64_thread_data()->fs; +- context->SegGs = ds64_sel; ++ context->SegDs = wow_frame->SegDs; ++ context->SegEs = wow_frame->SegEs; ++ context->SegFs = wow_frame->SegFs; ++ context->SegGs = wow_frame->SegGs; + context->ContextFlags |= CONTEXT_I386_SEGMENTS; + } + if (needed_flags & CONTEXT_I386_EXTENDED_REGISTERS) +@@ -2523,11 +2548,11 @@ void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB + wow_context->Esp = get_wow_teb( teb )->Tib.StackBase - 16; + wow_context->Eip = pLdrSystemDllInitBlock->pRtlUserThreadStart; + wow_context->SegCs = cs32_sel; +- wow_context->SegDs = ds64_sel; +- wow_context->SegEs = ds64_sel; +- wow_context->SegFs = thread_data->fs; +- wow_context->SegGs = ds64_sel; +- wow_context->SegSs = ds64_sel; ++ wow_context->SegDs = context.SegDs; ++ wow_context->SegEs = context.SegEs; ++ wow_context->SegFs = context.SegFs; ++ wow_context->SegGs = context.SegGs; ++ wow_context->SegSs = context.SegSs; + wow_context->EFlags = 0x202; + wow_context->FloatSave.ControlWord = context.FltSave.ControlWord; + *(XSAVE_FORMAT *)wow_context->ExtendedRegisters = context.FltSave; +@@ -2541,8 +2566,6 @@ void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB + memset( frame, 0, sizeof(*frame) ); + NtSetContextThread( GetCurrentThread(), ctx ); + +- frame->cs = cs64_sel; +- frame->ss = ds64_sel; + frame->rsp = (ULONG64)ctx - 8; + frame->rip = (ULONG64)pLdrInitializeThunk; + frame->rcx = (ULONG64)ctx; +@@ -2606,7 +2629,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, + __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") + "popq 0x80(%rcx)\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") +- "movl $0,0xb4(%rcx)\n\t" /* frame->restore_flags */ ++ "movl $0,0x94(%rcx)\n\t" /* frame->restore_flags */ + __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_prolog_end") ":\n\t" + "movq %rax,0x00(%rcx)\n\t" + "movq %rbx,0x08(%rcx)\n\t" +@@ -2625,9 +2648,13 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, + "movq %r15,0x68(%rcx)\n\t" + __ASM_CFI_REG_IS_AT2(r15, rcx, 0xe8, 0x00) + "movw %cs,0x78(%rcx)\n\t" ++ "movw %ds,0x7a(%rcx)\n\t" ++ "movw %es,0x7c(%rcx)\n\t" ++ "movw %fs,0x7e(%rcx)\n\t" + "movq %rsp,0x88(%rcx)\n\t" + __ASM_CFI_CFA_IS_AT2(rcx, 0x88, 0x01) + "movw %ss,0x90(%rcx)\n\t" ++ "movw %gs,0x92(%rcx)\n\t" + "movq %rbp,0x98(%rcx)\n\t" + __ASM_CFI_REG_IS_AT2(rbp, rcx, 0x98, 0x01) + /* Legends of Runeterra hooks the first system call return instruction, and +@@ -2732,7 +2759,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, + "callq *(%r10,%rax,8)\n\t" + "leaq -0x98(%rbp),%rcx\n\t" + __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\n\t" +- "movl 0xb4(%rcx),%edx\n\t" /* frame->restore_flags */ ++ "movl 0x94(%rcx),%edx\n\t" /* frame->restore_flags */ + "testl $0x48,%edx\n\t" /* CONTEXT_FLOATING_POINT | CONTEXT_XSTATE */ + "jnz 2f\n\t" + "movaps 0x1c0(%rcx),%xmm6\n\t" +@@ -2753,7 +2780,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, + "xorl %edx,%edx\n\t" + "xrstor64 0xc0(%rcx)\n\t" + "movq %r11,%rax\n\t" +- "movl 0xb4(%rcx),%edx\n\t" /* frame->restore_flags */ ++ "movl 0x94(%rcx),%edx\n\t" + "jmp 4f\n" + "3:\tfxrstor64 0xc0(%rcx)\n" + "4:\tmovq 0x98(%rcx),%rbp\n\t" +@@ -2771,7 +2798,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, + #ifdef __linux__ + "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ + "jz 1f\n\t" +- "movw %gs:0x338,%fs\n" /* amd64_thread_data()->fs */ ++ "movw 0x7e(%rcx),%fs\n" + "1:\n\t" + #endif + "movq 0x60(%rcx),%r14\n\t" +@@ -2844,7 +2871,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, + "popq 0x70(%rcx)\n\t" /* frame->rip */ + __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") + __ASM_CFI_REG_IS_AT2(rip, rcx, 0xf0,0x00) +- "movl $0,0xb4(%rcx)\n\t" /* frame->restore_flags */ ++ "movl $0,0x94(%rcx)\n\t" /* frame->restore_flags */ + __ASM_LOCAL_LABEL("__wine_unix_call_dispatcher_prolog_end") ":\n\t" + "movq %rbx,0x08(%rcx)\n\t" + __ASM_CFI_REG_IS_AT1(rbx, rcx, 0x08) +@@ -2892,6 +2919,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, + #ifdef __linux__ + "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ + "jz 2f\n\t" ++ "movw %fs,0x7e(%rcx)\n\t" + "movq %gs:0x320,%rsi\n\t" /* amd64_thread_data()->pthread_teb */ + "testl $8,%r14d\n\t" /* SYSCALL_HAVE_WRFSGSBASE */ + "jz 1f\n\t" +@@ -2915,7 +2943,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, + "movdqa 0x230(%rcx),%xmm13\n\t" + "movdqa 0x240(%rcx),%xmm14\n\t" + "movdqa 0x250(%rcx),%xmm15\n\t" +- "testl $0xffff,0xb4(%rcx)\n\t" /* frame->restore_flags */ ++ "testl $0xffff,0x94(%rcx)\n\t" /* frame->restore_flags */ + "jnz " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" + /* switch to user stack */ + "movq 0x88(%rcx),%rsp\n\t" +@@ -2923,7 +2951,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, + #ifdef __linux__ + "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ + "jz 1f\n\t" +- "movw %gs:0x338,%fs\n" /* amd64_thread_data()->fs */ ++ "movw 0x7e(%rcx),%fs\n" + "1:\n\t" + #endif + "movq 0x60(%rcx),%r14\n\t" From 93f6cd522ae1fc7793d94ef21c4c3e5c5f4eb2d8 Mon Sep 17 00:00:00 2001 From: ardishco-the-great Date: Fri, 16 Feb 2024 18:43:37 +0300 Subject: [PATCH 08/40] vinegar: switched Wine version to wine64Packages.staging, added segregrevert patch, added mouselock patch, added wine-loader-prefer-winedllpath.patch, bumped vinegar version from 1.6.1 --> 1.7.3 and removed patches folder --- pkgs/by-name/vi/vinegar/package.nix | 27 +- .../vi/vinegar/patches/segregrevert.mypatch | 350 ------------------ 2 files changed, 21 insertions(+), 356 deletions(-) delete mode 100644 pkgs/by-name/vi/vinegar/patches/segregrevert.mypatch diff --git a/pkgs/by-name/vi/vinegar/package.nix b/pkgs/by-name/vi/vinegar/package.nix index 08a566a7f87f..1740c3aa9d08 100644 --- a/pkgs/by-name/vi/vinegar/package.nix +++ b/pkgs/by-name/vi/vinegar/package.nix @@ -9,30 +9,45 @@ , wayland , vulkan-headers , wine64Packages +, fetchpatch }: let - wine = wine64Packages.stable.overrideDerivation (oldAttrs: { + wine = wine64Packages.staging.overrideDerivation (oldAttrs: { patches = - (oldAttrs.patches or [ ]) + (oldAttrs.patches or []) ++ [ # upstream issue: https://bugs.winehq.org/show_bug.cgi?id=55604 # Here are the currently applied patches for Roblox to run under WINE: - ./patches/segregrevert.mypatch + (fetchpatch { + name = "vinegar-wine-segregrevert.patch"; + url = "https://raw.githubusercontent.com/flathub/org.vinegarhq.Vinegar/e24cb9dfa996bcfeaa46504c0375660fe271148d/patches/wine/segregrevert.patch"; + hash = "sha256-+3Nld81nG3GufI4jAF6yrWfkJmsSCOku39rx0Hov29c="; + }) + (fetchpatch { + name = "vinegar-wine-mouselock.patch"; + url = "https://raw.githubusercontent.com/flathub/org.vinegarhq.Vinegar/e24cb9dfa996bcfeaa46504c0375660fe271148d/patches/wine/mouselock.patch"; + hash = "sha256-0AGA4AQbxTL5BGVbm072moav7xVA3zpotYqM8pcEDa4="; + }) + (fetchpatch { + name = "vinegar-wine-loader-prefer-winedllpath.patch"; + url = "https://raw.githubusercontent.com/flathub/org.vinegarhq.Vinegar/e24cb9dfa996bcfeaa46504c0375660fe271148d/patches/wine/loader-prefer-winedllpath.patch"; + hash = "sha256-KscGMMSmjnQEBjNSHECw9VCX2H6z7fKxrqxEfElGwJQ="; + }) ]; }); in buildGoModule rec { pname = "vinegar"; - version = "1.6.1"; + version = "1.7.3"; src = fetchFromGitHub { owner = "vinegarhq"; repo = "vinegar"; rev = "v${version}"; - hash = "sha256-uRdWE5NwRVSuUZyU5B5u5DfJOxu/gUqwM682eORTDOs="; + hash = "sha256-aKL+4jw/uMbbvLRCBHstCTrcQ1PTYSCwMNgXTvSvMeY="; }; - vendorHash = "sha256-Ex6PRd3rD2jbLXlY36koNvZF3P+gAZTE9hExIfOw9CE="; + vendorHash = "sha256-OaMfWecOPQh6quXjYkZLyBDHZ9TINSA7Ue/Y0sz5ZYY="; nativeBuildInputs = [ pkg-config makeBinaryWrapper ]; buildInputs = [ libGL libxkbcommon xorg.libX11 xorg.libXcursor xorg.libXfixes wayland vulkan-headers wine ]; diff --git a/pkgs/by-name/vi/vinegar/patches/segregrevert.mypatch b/pkgs/by-name/vi/vinegar/patches/segregrevert.mypatch deleted file mode 100644 index 09a38e0aff32..000000000000 --- a/pkgs/by-name/vi/vinegar/patches/segregrevert.mypatch +++ /dev/null @@ -1,350 +0,0 @@ -diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c -index 2f7715a0a60..66cabfd5e64 100644 ---- a/dlls/ntdll/signal_x86_64.c -+++ b/dlls/ntdll/signal_x86_64.c -@@ -559,6 +559,10 @@ NTSTATUS WINAPI dispatch_exception( EXCEPTION_RECORD *rec, CONTEXT *context ) - context->R12, context->R13, context->R14, context->R15 ); - } - -+ /* Legends of Runeterra depends on having SegDs == SegSs in an exception -+ * handler. */ -+ context->SegDs = context->SegSs; -+ - if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION) - NtContinue( context, FALSE ); - -diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c -index 3c4d6620fe8..cccd62ae8c0 100644 ---- a/dlls/ntdll/tests/exception.c -+++ b/dlls/ntdll/tests/exception.c -@@ -1825,8 +1825,8 @@ static void test_thread_context(void) - ok( context.SegDs == LOWORD(expect.SegDs), "wrong SegDs %08lx/%08lx\n", context.SegDs, expect.SegDs ); - ok( context.SegEs == LOWORD(expect.SegEs), "wrong SegEs %08lx/%08lx\n", context.SegEs, expect.SegEs ); - ok( context.SegFs == LOWORD(expect.SegFs), "wrong SegFs %08lx/%08lx\n", context.SegFs, expect.SegFs ); -- if (LOWORD(expect.SegGs)) ok( context.SegGs == LOWORD(expect.SegGs), "wrong SegGs %08lx/%08lx\n", context.SegGs, expect.SegGs ); -- ok( context.SegSs == LOWORD(expect.SegSs), "wrong SegSs %08lx/%08lx\n", context.SegSs, expect.SegSs ); -+ ok( context.SegGs == LOWORD(expect.SegGs), "wrong SegGs %08lx/%08lx\n", context.SegGs, expect.SegGs ); -+ ok( context.SegSs == LOWORD(expect.SegSs), "wrong SegSs %08lx/%08lx\n", context.SegSs, expect.SegGs ); - - ok( LOWORD(context.FloatSave.ControlWord) == LOWORD(expect.x87_control), - "wrong x87 control word %#lx/%#lx.\n", context.FloatSave.ControlWord, expect.x87_control ); -@@ -3278,9 +3278,9 @@ static DWORD WINAPI handler( EXCEPTION_RECORD *rec, ULONG64 frame, - ok( context->SegSs == ss, "ss %#x does not match %#x\n", context->SegSs, ss ); - ok( context->SegDs == context->SegSs, - "ds %#x does not match ss %#x\n", context->SegDs, context->SegSs ); -- ok( context->SegEs == context->SegSs, -+ todo_wine ok( context->SegEs == context->SegSs, - "es %#x does not match ss %#x\n", context->SegEs, context->SegSs ); -- ok( context->SegGs == context->SegSs, -+ todo_wine ok( context->SegGs == context->SegSs, - "gs %#x does not match ss %#x\n", context->SegGs, context->SegSs ); - todo_wine ok( context->SegFs && context->SegFs != context->SegSs, - "got fs %#x\n", context->SegFs ); -@@ -3618,12 +3618,13 @@ static void test_exceptions(void) - ok( ctx.SegDs == ds, "wrong ds %04x / %04x\n", ctx.SegDs, ds ); - ok( ctx.SegEs == es, "wrong es %04x / %04x\n", ctx.SegEs, es ); - ok( ctx.SegFs == fs, "wrong fs %04x / %04x\n", ctx.SegFs, fs ); -- ok( ctx.SegGs == gs || !gs, "wrong gs %04x / %04x\n", ctx.SegGs, gs ); -+ ok( ctx.SegGs == gs, "wrong gs %04x / %04x\n", ctx.SegGs, gs ); - ok( ctx.SegSs == ss, "wrong ss %04x / %04x\n", ctx.SegSs, ss ); -- ok( ctx.SegDs == ctx.SegSs, "wrong ds %04x / %04x\n", ctx.SegDs, ctx.SegSs ); -- ok( ctx.SegEs == ctx.SegSs, "wrong es %04x / %04x\n", ctx.SegEs, ctx.SegSs ); -+ todo_wine ok( ctx.SegEs == ctx.SegSs, "wrong es %04x / %04x\n", ctx.SegEs, ctx.SegSs ); - ok( ctx.SegFs != ctx.SegSs, "wrong fs %04x / %04x\n", ctx.SegFs, ctx.SegSs ); -- ok( ctx.SegGs == ctx.SegSs, "wrong gs %04x / %04x\n", ctx.SegGs, ctx.SegSs ); -+ todo_wine ok( ctx.SegGs == ctx.SegSs, "wrong gs %04x / %04x\n", ctx.SegGs, ctx.SegSs ); -+ if (ctx.SegDs == ctx.SegSs) /* FIXME: remove once Wine is fixed */ -+ { - ctx.SegDs = 0; - ctx.SegEs = ctx.SegFs; - ctx.SegFs = ctx.SegSs; -@@ -3639,12 +3640,13 @@ static void test_exceptions(void) - ok( ctx.SegDs == ds, "wrong ds %04x / %04x\n", ctx.SegDs, ds ); - ok( ctx.SegEs == es, "wrong es %04x / %04x\n", ctx.SegEs, es ); - ok( ctx.SegFs == fs, "wrong fs %04x / %04x\n", ctx.SegFs, fs ); -- ok( ctx.SegGs == gs || !gs, "wrong gs %04x / %04x\n", ctx.SegGs, gs ); -+ ok( ctx.SegGs == gs, "wrong gs %04x / %04x\n", ctx.SegGs, gs ); - ok( ctx.SegSs == ss, "wrong ss %04x / %04x\n", ctx.SegSs, ss ); - ok( ctx.SegDs == ctx.SegSs, "wrong ds %04x / %04x\n", ctx.SegDs, ctx.SegSs ); - ok( ctx.SegEs == ctx.SegSs, "wrong es %04x / %04x\n", ctx.SegEs, ctx.SegSs ); - ok( ctx.SegFs != ctx.SegSs, "wrong fs %04x / %04x\n", ctx.SegFs, ctx.SegSs ); -- ok( ctx.SegGs == ctx.SegSs, "wrong gs %04x / %04x\n", ctx.SegGs, ctx.SegSs ); -+ todo_wine ok( ctx.SegGs == ctx.SegSs, "wrong gs %04x / %04x\n", ctx.SegGs, ctx.SegSs ); -+ } - } - - static DWORD WINAPI simd_fault_handler( EXCEPTION_RECORD *rec, ULONG64 frame, -@@ -4403,7 +4405,7 @@ static void test_thread_context(void) - COMPARE( SegDs ); - COMPARE( SegEs ); - COMPARE( SegFs ); -- if (expect.SegGs) COMPARE( SegGs ); -+ COMPARE( SegGs ); - COMPARE( SegSs ); - - /* AMD CPUs don't save the opcode or data pointer if no exception is -diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c -index 53827629af4..526885221b3 100644 ---- a/dlls/ntdll/unix/signal_x86_64.c -+++ b/dlls/ntdll/unix/signal_x86_64.c -@@ -413,16 +413,20 @@ struct syscall_frame - ULONG64 r14; /* 0060 */ - ULONG64 r15; /* 0068 */ - ULONG64 rip; /* 0070 */ -- ULONG64 cs; /* 0078 */ -+ WORD cs; /* 0078 */ -+ WORD ds; /* 007a */ -+ WORD es; /* 007c */ -+ WORD fs; /* 007e */ - ULONG64 eflags; /* 0080 */ - ULONG64 rsp; /* 0088 */ -- ULONG64 ss; /* 0090 */ -+ WORD ss; /* 0090 */ -+ WORD gs; /* 0092 */ -+ DWORD restore_flags; /* 0094 */ - ULONG64 rbp; /* 0098 */ - struct syscall_frame *prev_frame; /* 00a0 */ - void *syscall_cfa; /* 00a8 */ - DWORD syscall_flags; /* 00b0 */ -- DWORD restore_flags; /* 00b4 */ -- DWORD align[2]; /* 00b8 */ -+ DWORD align[3]; /* 00b4 */ - XMM_SAVE_AREA32 xsave; /* 00c0 */ - DECLSPEC_ALIGN(64) XSTATE xstate; /* 02c0 */ - }; -@@ -809,7 +813,17 @@ static inline void set_sigcontext( const CONTEXT *context, ucontext_t *sigcontex - RIP_sig(sigcontext) = context->Rip; - CS_sig(sigcontext) = context->SegCs; - FS_sig(sigcontext) = context->SegFs; -+ GS_sig(sigcontext) = context->SegGs; - EFL_sig(sigcontext) = context->EFlags; -+ #ifdef DS_sig -+ DS_sig(sigcontext) = context->SegDs; -+ #endif -+ #ifdef ES_sig -+ ES_sig(sigcontext) = context->SegEs; -+ #endif -+ #ifdef SS_sig -+ SS_sig(sigcontext) = context->SegSs; -+ #endif - } - - -@@ -838,16 +852,6 @@ static inline void leave_handler( ucontext_t *sigcontext ) - if (fs32_sel && !is_inside_signal_stack( (void *)RSP_sig(sigcontext )) && !is_inside_syscall(sigcontext)) - __asm__ volatile( "movw %0,%%fs" :: "r" (fs32_sel) ); - #endif --#ifdef DS_sig -- DS_sig(sigcontext) = ds64_sel; --#else -- __asm__ volatile( "movw %0,%%ds" :: "r" (ds64_sel) ); --#endif --#ifdef ES_sig -- ES_sig(sigcontext) = ds64_sel; --#else -- __asm__ volatile( "movw %0,%%es" :: "r" (ds64_sel) ); --#endif - } - - -@@ -880,11 +884,23 @@ static void save_context( struct xcontext *xcontext, const ucontext_t *sigcontex - context->Rip = RIP_sig(sigcontext); - context->SegCs = CS_sig(sigcontext); - context->SegFs = FS_sig(sigcontext); -+ context->SegGs = GS_sig(sigcontext); - context->EFlags = EFL_sig(sigcontext); -- context->SegDs = ds64_sel; -- context->SegEs = ds64_sel; -- context->SegGs = ds64_sel; -- context->SegSs = ds64_sel; -+ #ifdef DS_sig -+ context->SegDs = DS_sig(sigcontext); -+ #else -+ __asm__("movw %%ds,%0" : "=m" (context->SegDs)); -+ #endif -+ #ifdef ES_sig -+ context->SegEs = ES_sig(sigcontext); -+ #else -+ __asm__("movw %%es,%0" : "=m" (context->SegEs)); -+ #endif -+ #ifdef SS_sig -+ context->SegSs = SS_sig(sigcontext); -+ #else -+ __asm__("movw %%ss,%0" : "=m" (context->SegSs)); -+ #endif - context->Dr0 = amd64_thread_data()->dr0; - context->Dr1 = amd64_thread_data()->dr1; - context->Dr2 = amd64_thread_data()->dr2; -@@ -1041,6 +1057,15 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context ) - frame->rbp = context->Rbp; - frame->rip = context->Rip; - frame->eflags = context->EFlags; -+ frame->cs = context->SegCs; -+ frame->ss = context->SegSs; -+ } -+ if (flags & CONTEXT_SEGMENTS) -+ { -+ frame->ds = context->SegDs; -+ frame->es = context->SegEs; -+ frame->fs = context->SegFs; -+ frame->gs = context->SegGs; - } - if (flags & CONTEXT_FLOATING_POINT) - { -@@ -1108,16 +1133,16 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context ) - context->Rbp = frame->rbp; - context->Rip = frame->rip; - context->EFlags = frame->eflags; -- context->SegCs = cs64_sel; -- context->SegSs = ds64_sel; -+ context->SegCs = frame->cs; -+ context->SegSs = frame->ss; - context->ContextFlags |= CONTEXT_CONTROL; - } - if (needed_flags & CONTEXT_SEGMENTS) - { -- context->SegDs = ds64_sel; -- context->SegEs = ds64_sel; -- context->SegFs = amd64_thread_data()->fs; -- context->SegGs = ds64_sel; -+ context->SegDs = frame->ds; -+ context->SegEs = frame->es; -+ context->SegFs = frame->fs; -+ context->SegGs = frame->gs; - context->ContextFlags |= CONTEXT_SEGMENTS; - } - if (needed_flags & CONTEXT_FLOATING_POINT) -@@ -1345,16 +1370,16 @@ NTSTATUS get_thread_wow64_context( HANDLE handle, void *ctx, ULONG size ) - context->Ebp = wow_frame->Ebp; - context->Eip = wow_frame->Eip; - context->EFlags = wow_frame->EFlags; -- context->SegCs = cs32_sel; -- context->SegSs = ds64_sel; -+ context->SegCs = wow_frame->SegCs; -+ context->SegSs = wow_frame->SegSs; - context->ContextFlags |= CONTEXT_I386_CONTROL; - } - if (needed_flags & CONTEXT_I386_SEGMENTS) - { -- context->SegDs = ds64_sel; -- context->SegEs = ds64_sel; -- context->SegFs = amd64_thread_data()->fs; -- context->SegGs = ds64_sel; -+ context->SegDs = wow_frame->SegDs; -+ context->SegEs = wow_frame->SegEs; -+ context->SegFs = wow_frame->SegFs; -+ context->SegGs = wow_frame->SegGs; - context->ContextFlags |= CONTEXT_I386_SEGMENTS; - } - if (needed_flags & CONTEXT_I386_EXTENDED_REGISTERS) -@@ -2523,11 +2548,11 @@ void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB - wow_context->Esp = get_wow_teb( teb )->Tib.StackBase - 16; - wow_context->Eip = pLdrSystemDllInitBlock->pRtlUserThreadStart; - wow_context->SegCs = cs32_sel; -- wow_context->SegDs = ds64_sel; -- wow_context->SegEs = ds64_sel; -- wow_context->SegFs = thread_data->fs; -- wow_context->SegGs = ds64_sel; -- wow_context->SegSs = ds64_sel; -+ wow_context->SegDs = context.SegDs; -+ wow_context->SegEs = context.SegEs; -+ wow_context->SegFs = context.SegFs; -+ wow_context->SegGs = context.SegGs; -+ wow_context->SegSs = context.SegSs; - wow_context->EFlags = 0x202; - wow_context->FloatSave.ControlWord = context.FltSave.ControlWord; - *(XSAVE_FORMAT *)wow_context->ExtendedRegisters = context.FltSave; -@@ -2541,8 +2566,6 @@ void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB - memset( frame, 0, sizeof(*frame) ); - NtSetContextThread( GetCurrentThread(), ctx ); - -- frame->cs = cs64_sel; -- frame->ss = ds64_sel; - frame->rsp = (ULONG64)ctx - 8; - frame->rip = (ULONG64)pLdrInitializeThunk; - frame->rcx = (ULONG64)ctx; -@@ -2606,7 +2629,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, - __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") - "popq 0x80(%rcx)\n\t" - __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") -- "movl $0,0xb4(%rcx)\n\t" /* frame->restore_flags */ -+ "movl $0,0x94(%rcx)\n\t" /* frame->restore_flags */ - __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_prolog_end") ":\n\t" - "movq %rax,0x00(%rcx)\n\t" - "movq %rbx,0x08(%rcx)\n\t" -@@ -2625,9 +2648,13 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, - "movq %r15,0x68(%rcx)\n\t" - __ASM_CFI_REG_IS_AT2(r15, rcx, 0xe8, 0x00) - "movw %cs,0x78(%rcx)\n\t" -+ "movw %ds,0x7a(%rcx)\n\t" -+ "movw %es,0x7c(%rcx)\n\t" -+ "movw %fs,0x7e(%rcx)\n\t" - "movq %rsp,0x88(%rcx)\n\t" - __ASM_CFI_CFA_IS_AT2(rcx, 0x88, 0x01) - "movw %ss,0x90(%rcx)\n\t" -+ "movw %gs,0x92(%rcx)\n\t" - "movq %rbp,0x98(%rcx)\n\t" - __ASM_CFI_REG_IS_AT2(rbp, rcx, 0x98, 0x01) - /* Legends of Runeterra hooks the first system call return instruction, and -@@ -2732,7 +2759,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, - "callq *(%r10,%rax,8)\n\t" - "leaq -0x98(%rbp),%rcx\n\t" - __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\n\t" -- "movl 0xb4(%rcx),%edx\n\t" /* frame->restore_flags */ -+ "movl 0x94(%rcx),%edx\n\t" /* frame->restore_flags */ - "testl $0x48,%edx\n\t" /* CONTEXT_FLOATING_POINT | CONTEXT_XSTATE */ - "jnz 2f\n\t" - "movaps 0x1c0(%rcx),%xmm6\n\t" -@@ -2753,7 +2780,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, - "xorl %edx,%edx\n\t" - "xrstor64 0xc0(%rcx)\n\t" - "movq %r11,%rax\n\t" -- "movl 0xb4(%rcx),%edx\n\t" /* frame->restore_flags */ -+ "movl 0x94(%rcx),%edx\n\t" - "jmp 4f\n" - "3:\tfxrstor64 0xc0(%rcx)\n" - "4:\tmovq 0x98(%rcx),%rbp\n\t" -@@ -2771,7 +2798,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, - #ifdef __linux__ - "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ - "jz 1f\n\t" -- "movw %gs:0x338,%fs\n" /* amd64_thread_data()->fs */ -+ "movw 0x7e(%rcx),%fs\n" - "1:\n\t" - #endif - "movq 0x60(%rcx),%r14\n\t" -@@ -2844,7 +2871,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, - "popq 0x70(%rcx)\n\t" /* frame->rip */ - __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") - __ASM_CFI_REG_IS_AT2(rip, rcx, 0xf0,0x00) -- "movl $0,0xb4(%rcx)\n\t" /* frame->restore_flags */ -+ "movl $0,0x94(%rcx)\n\t" /* frame->restore_flags */ - __ASM_LOCAL_LABEL("__wine_unix_call_dispatcher_prolog_end") ":\n\t" - "movq %rbx,0x08(%rcx)\n\t" - __ASM_CFI_REG_IS_AT1(rbx, rcx, 0x08) -@@ -2892,6 +2919,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, - #ifdef __linux__ - "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ - "jz 2f\n\t" -+ "movw %fs,0x7e(%rcx)\n\t" - "movq %gs:0x320,%rsi\n\t" /* amd64_thread_data()->pthread_teb */ - "testl $8,%r14d\n\t" /* SYSCALL_HAVE_WRFSGSBASE */ - "jz 1f\n\t" -@@ -2915,7 +2943,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, - "movdqa 0x230(%rcx),%xmm13\n\t" - "movdqa 0x240(%rcx),%xmm14\n\t" - "movdqa 0x250(%rcx),%xmm15\n\t" -- "testl $0xffff,0xb4(%rcx)\n\t" /* frame->restore_flags */ -+ "testl $0xffff,0x94(%rcx)\n\t" /* frame->restore_flags */ - "jnz " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" - /* switch to user stack */ - "movq 0x88(%rcx),%rsp\n\t" -@@ -2923,7 +2951,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, - #ifdef __linux__ - "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ - "jz 1f\n\t" -- "movw %gs:0x338,%fs\n" /* amd64_thread_data()->fs */ -+ "movw 0x7e(%rcx),%fs\n" - "1:\n\t" - #endif - "movq 0x60(%rcx),%r14\n\t" From 5a810307b2ffab6120f1583d29a6ec449dea2dcd Mon Sep 17 00:00:00 2001 From: ardishco-the-great Date: Sun, 18 Feb 2024 02:24:50 +0300 Subject: [PATCH 09/40] vinegar: removed wine-loader-prefer-winedllpatch.patch --- pkgs/by-name/vi/vinegar/package.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/by-name/vi/vinegar/package.nix b/pkgs/by-name/vi/vinegar/package.nix index 1740c3aa9d08..9873d6b5d187 100644 --- a/pkgs/by-name/vi/vinegar/package.nix +++ b/pkgs/by-name/vi/vinegar/package.nix @@ -28,11 +28,6 @@ let url = "https://raw.githubusercontent.com/flathub/org.vinegarhq.Vinegar/e24cb9dfa996bcfeaa46504c0375660fe271148d/patches/wine/mouselock.patch"; hash = "sha256-0AGA4AQbxTL5BGVbm072moav7xVA3zpotYqM8pcEDa4="; }) - (fetchpatch { - name = "vinegar-wine-loader-prefer-winedllpath.patch"; - url = "https://raw.githubusercontent.com/flathub/org.vinegarhq.Vinegar/e24cb9dfa996bcfeaa46504c0375660fe271148d/patches/wine/loader-prefer-winedllpath.patch"; - hash = "sha256-KscGMMSmjnQEBjNSHECw9VCX2H6z7fKxrqxEfElGwJQ="; - }) ]; }); in From 1c153713930102fab49d67135a3b337327024fc5 Mon Sep 17 00:00:00 2001 From: ardishco-the-great Date: Mon, 19 Feb 2024 19:03:36 +0300 Subject: [PATCH 10/40] vinegar: added overrideAttrs comment back (minor change) --- pkgs/by-name/vi/vinegar/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/vi/vinegar/package.nix b/pkgs/by-name/vi/vinegar/package.nix index 9873d6b5d187..19dd30209443 100644 --- a/pkgs/by-name/vi/vinegar/package.nix +++ b/pkgs/by-name/vi/vinegar/package.nix @@ -12,6 +12,7 @@ , fetchpatch }: let + # wine-staging doesn't support overrideAttrs for now wine = wine64Packages.staging.overrideDerivation (oldAttrs: { patches = (oldAttrs.patches or []) From 36d6a4f2784741dba326e7d506e12b33f508e243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2024 13:54:47 -0800 Subject: [PATCH 11/40] python311Packages.structlog: add dotlambda to maintainers --- pkgs/development/python-modules/structlog/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/structlog/default.nix b/pkgs/development/python-modules/structlog/default.nix index f53e3c90945d..a7d0d55a4ee5 100644 --- a/pkgs/development/python-modules/structlog/default.nix +++ b/pkgs/development/python-modules/structlog/default.nix @@ -61,6 +61,6 @@ buildPythonPackage rec { homepage = "https://github.com/hynek/structlog"; changelog = "https://github.com/hynek/structlog/blob/${version}/CHANGELOG.md"; license = licenses.asl20; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ dotlambda ]; }; } From bd57ffe6e7239c59fd5567d8fd87b4e596429975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2024 13:52:01 -0800 Subject: [PATCH 12/40] python311Packages.structlog: 23.2.0 -> 24.1.0 Diff: https://github.com/hynek/structlog/compare/refs/tags/23.2.0...24.1.0 Changelog: https://github.com/hynek/structlog/blob/24.1.0/CHANGELOG.md --- .../python-modules/structlog/default.nix | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/structlog/default.nix b/pkgs/development/python-modules/structlog/default.nix index a7d0d55a4ee5..a6c826a00a5e 100644 --- a/pkgs/development/python-modules/structlog/default.nix +++ b/pkgs/development/python-modules/structlog/default.nix @@ -11,13 +11,12 @@ , pythonOlder , simplejson , twisted -, typing-extensions }: buildPythonPackage rec { pname = "structlog"; - version = "23.2.0"; - format = "pyproject"; + version = "24.1.0"; + pyproject = true; disabled = pythonOlder "3.8"; @@ -25,7 +24,7 @@ buildPythonPackage rec { owner = "hynek"; repo = "structlog"; rev = "refs/tags/${version}"; - hash = "sha256-KSHKgkv+kObKCdWZDg5o6QYe0AMND9VLdEuseY/GyDY="; + hash = "sha256-0Yc28UEeozK2+IqILFTqHoTiM5L2SA4t6jld4qTBSzQ="; }; nativeBuildInputs = [ @@ -34,10 +33,6 @@ buildPythonPackage rec { hatchling ]; - propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ - typing-extensions - ]; - nativeCheckInputs = [ freezegun pretend @@ -47,11 +42,6 @@ buildPythonPackage rec { twisted ]; - disabledTests = [ - # _pickle.PicklingError: Only BytesLoggers to sys.stdout and sys.stderr can be pickled. - "test_pickle" - ]; - pythonImportsCheck = [ "structlog" ]; From 91815b8f47bf965539bb80bc2564af02a8ce2f28 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 21 Feb 2024 04:20:00 +0000 Subject: [PATCH 13/40] chez: 9.6.4 -> 10.0.0 Diff: https://github.com/cisco/ChezScheme/compare/v9.6.4...v10.0.0 Changelog: https://cisco.github.io/ChezScheme/release_notes/v10.0/release_notes.html --- pkgs/development/compilers/chez/default.nix | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/pkgs/development/compilers/chez/default.nix b/pkgs/development/compilers/chez/default.nix index fc7dfa78cefe..9327b69998f7 100644 --- a/pkgs/development/compilers/chez/default.nix +++ b/pkgs/development/compilers/chez/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "chez-scheme"; - version = "9.6.4"; + version = "10.0.0"; src = fetchurl { url = "https://github.com/cisco/ChezScheme/releases/download/v${finalAttrs.version}/csv${finalAttrs.version}.tar.gz"; - hash = "sha256-9YJ2gvolnEeXX/4Hh4X7Vh5KXFT3ZDMe9mwyEyhDaF0="; + hash = "sha256-03GZASte0ZhcQGnWqH/xjl4fWi3yfkApkfr0XcTyIyw="; }; nativeBuildInputs = lib.optional stdenv.isDarwin cctools; @@ -28,18 +28,11 @@ stdenv.mkDerivation (finalAttrs: { ** NixOS or in any chroot build. */ patchPhase = '' - substituteInPlace ./configure \ - --replace "git submodule init && git submodule update || exit 1" "true" - - substituteInPlace ./workarea \ - --replace "/bin/ln" ln \ - --replace "/bin/cp" cp - substituteInPlace ./makefiles/installsh \ - --replace "/usr/bin/true" "${coreutils}/bin/true" + --replace-warn "/usr/bin/true" "${coreutils}/bin/true" substituteInPlace zlib/configure \ - --replace "/usr/bin/libtool" libtool + --replace-warn "/usr/bin/libtool" libtool ''; /* @@ -52,7 +45,7 @@ stdenv.mkDerivation (finalAttrs: { ** for. */ configurePhase = '' - ./configure --threads --installprefix=$out --installman=$out/share/man + ./configure --as-is --threads --installprefix=$out --installman=$out/share/man ''; /* From 5e7907a11102a285d45e210ab88c59590f67a0a8 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 21 Feb 2024 04:20:00 +0000 Subject: [PATCH 14/40] chez: add meta.mainProgram --- pkgs/development/compilers/chez/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/compilers/chez/default.nix b/pkgs/development/compilers/chez/default.nix index 9327b69998f7..dfdb47f5db24 100644 --- a/pkgs/development/compilers/chez/default.nix +++ b/pkgs/development/compilers/chez/default.nix @@ -64,5 +64,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ thoughtpolice ]; platforms = lib.platforms.unix; badPlatforms = [ "aarch64-linux" "aarch64-darwin" ]; + mainProgram = "scheme"; }; }) From 1fb5e0221fae5428666a01cfb0582eaa34890056 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 21 Feb 2024 04:20:00 +0000 Subject: [PATCH 15/40] chez: add version tester --- pkgs/development/compilers/chez/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/chez/default.nix b/pkgs/development/compilers/chez/default.nix index dfdb47f5db24..9a8338f06730 100644 --- a/pkgs/development/compilers/chez/default.nix +++ b/pkgs/development/compilers/chez/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl , coreutils, cctools -, ncurses, libiconv, libX11, libuuid +, ncurses, libiconv, libX11, libuuid, testers }: stdenv.mkDerivation (finalAttrs: { @@ -57,6 +57,12 @@ stdenv.mkDerivation (finalAttrs: { setupHook = ./setup-hook.sh; + passthru.tests = { + version = testers.testVersion { + package = finalAttrs.finalPackage; + }; + }; + meta = { description = "A powerful and incredibly fast R6RS Scheme compiler"; homepage = "https://cisco.github.io/ChezScheme/"; From 28e2594c1e6d538d5fd261aac76d225b1271c151 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Thu, 22 Feb 2024 11:45:15 +0800 Subject: [PATCH 16/40] tang: 14 -> 15 --- pkgs/servers/tang/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/tang/default.nix b/pkgs/servers/tang/default.nix index 4206973dbd15..e6581921fcb7 100644 --- a/pkgs/servers/tang/default.nix +++ b/pkgs/servers/tang/default.nix @@ -18,13 +18,13 @@ stdenv.mkDerivation rec { pname = "tang"; - version = "14"; + version = "15"; src = fetchFromGitHub { owner = "latchset"; repo = "tang"; rev = "refs/tags/v${version}"; - hash = "sha256-QKURKb2g71pZvuZlJk3Rc26H3oU0WSkjgQtJQLrYGbw="; + hash = "sha256-nlC2hdNzQZrfirjS2gX4oFp2OD1OdxmLsN03hfxD3ug="; }; nativeBuildInputs = [ From 2a58797444db810cc091aada159fed626c1fb53e Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Thu, 22 Feb 2024 04:20:00 +0000 Subject: [PATCH 17/40] chez: remove meta.badPlatforms --- pkgs/development/compilers/chez/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/compilers/chez/default.nix b/pkgs/development/compilers/chez/default.nix index 9a8338f06730..c0448a7e6d4f 100644 --- a/pkgs/development/compilers/chez/default.nix +++ b/pkgs/development/compilers/chez/default.nix @@ -69,7 +69,6 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.asl20; maintainers = with lib.maintainers; [ thoughtpolice ]; platforms = lib.platforms.unix; - badPlatforms = [ "aarch64-linux" "aarch64-darwin" ]; mainProgram = "scheme"; }; }) From a02aaf88900481acae86f0bd93200b5503cdd57a Mon Sep 17 00:00:00 2001 From: wackbyte Date: Wed, 21 Feb 2024 20:38:12 -0500 Subject: [PATCH 18/40] rojo: 7.4.0 -> 7.4.1 --- pkgs/development/tools/rojo/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rojo/default.nix b/pkgs/development/tools/rojo/default.nix index 1eaeed08316a..0ed91bd18e3e 100644 --- a/pkgs/development/tools/rojo/default.nix +++ b/pkgs/development/tools/rojo/default.nix @@ -12,17 +12,17 @@ let in rustPlatform.buildRustPackage rec { pname = "rojo"; - version = "7.4.0"; + version = "7.4.1"; src = fetchFromGitHub { owner = "rojo-rbx"; repo = "rojo"; rev = "v${version}"; - sha256 = "sha256-Eh1G0jX9KXVlMZLl8whxULywadblWml232qvcq4JLJ4="; + hash = "sha256-7fnzNYAbsZW/48C4dwpMXXQy2ZgxbYFSs85wNKGcu/4="; fetchSubmodules = true; }; - cargoSha256 = "sha256-aKfgylY9aspL1JpdYa6hOy/6lQoqO54OhZWqSlMPZ8o="; + cargoHash = "sha256-9kmSNWsZY0OcqaYOCblMwkXTdGXhj7f/2pUDx/L/o2o="; nativeBuildInputs = [ pkg-config From e2f81c0f30ec12071af7afa9d9d70f20b2e816e1 Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Sat, 24 Feb 2024 14:39:04 +0100 Subject: [PATCH 19/40] zabbix50: 5.0.37 -> 5.0.41 Fixes CVE-2024-22119 / https://support.zabbix.com/browse/ZBX-24070 Changes: https://www.zabbix.com/rn/rn5.0.41 https://www.zabbix.com/rn/rn5.0.40 https://www.zabbix.com/rn/rn5.0.39 https://www.zabbix.com/rn/rn5.0.38 --- pkgs/servers/monitoring/zabbix/agent.nix | 4 ++-- pkgs/servers/monitoring/zabbix/agent2.nix | 4 ++-- pkgs/servers/monitoring/zabbix/proxy.nix | 4 ++-- pkgs/servers/monitoring/zabbix/server.nix | 4 ++-- pkgs/servers/monitoring/zabbix/versions.nix | 8 ++++---- pkgs/servers/monitoring/zabbix/web.nix | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pkgs/servers/monitoring/zabbix/agent.nix b/pkgs/servers/monitoring/zabbix/agent.nix index 4aaeb9f103d6..3f1d80ca4df9 100644 --- a/pkgs/servers/monitoring/zabbix/agent.nix +++ b/pkgs/servers/monitoring/zabbix/agent.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchurl, pkg-config, libiconv, openssl, pcre }: -import ./versions.nix ({ version, sha256, ... }: +import ./versions.nix ({ version, hash, ... }: stdenv.mkDerivation { pname = "zabbix-agent"; inherit version; src = fetchurl { url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz"; - inherit sha256; + inherit hash; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/servers/monitoring/zabbix/agent2.nix b/pkgs/servers/monitoring/zabbix/agent2.nix index 718522c8fccf..374a137297f1 100644 --- a/pkgs/servers/monitoring/zabbix/agent2.nix +++ b/pkgs/servers/monitoring/zabbix/agent2.nix @@ -1,13 +1,13 @@ { lib, buildGoModule, fetchurl, autoreconfHook, pkg-config, libiconv, openssl, pcre, zlib }: -import ./versions.nix ({ version, sha256, vendorHash ? throw "unsupported version ${version} for zabbix-agent2", ... }: +import ./versions.nix ({ version, hash, vendorHash ? throw "unsupported version ${version} for zabbix-agent2", ... }: buildGoModule { pname = "zabbix-agent2"; inherit version; src = fetchurl { url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz"; - inherit sha256; + inherit hash; }; modRoot = "src/go"; diff --git a/pkgs/servers/monitoring/zabbix/proxy.nix b/pkgs/servers/monitoring/zabbix/proxy.nix index f9088e682bdb..b287ef56c76f 100644 --- a/pkgs/servers/monitoring/zabbix/proxy.nix +++ b/pkgs/servers/monitoring/zabbix/proxy.nix @@ -15,14 +15,14 @@ assert sqliteSupport -> !mysqlSupport && !postgresqlSupport; let inherit (lib) optional optionalString; in - import ./versions.nix ({ version, sha256, ... }: + import ./versions.nix ({ version, hash, ... }: stdenv.mkDerivation { pname = "zabbix-proxy"; inherit version; src = fetchurl { url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz"; - inherit sha256; + inherit hash; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/servers/monitoring/zabbix/server.nix b/pkgs/servers/monitoring/zabbix/server.nix index 3cffedd5aeb0..5abf6a93d55d 100644 --- a/pkgs/servers/monitoring/zabbix/server.nix +++ b/pkgs/servers/monitoring/zabbix/server.nix @@ -16,14 +16,14 @@ assert postgresqlSupport -> !mysqlSupport; let inherit (lib) optional optionalString; in - import ./versions.nix ({ version, sha256, ... }: + import ./versions.nix ({ version, hash, ... }: stdenv.mkDerivation { pname = "zabbix-server"; inherit version; src = fetchurl { url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz"; - inherit sha256; + inherit hash; }; nativeBuildInputs = [ autoreconfHook pkg-config ]; diff --git a/pkgs/servers/monitoring/zabbix/versions.nix b/pkgs/servers/monitoring/zabbix/versions.nix index cf4d9bc8508b..a106edbf9056 100644 --- a/pkgs/servers/monitoring/zabbix/versions.nix +++ b/pkgs/servers/monitoring/zabbix/versions.nix @@ -1,13 +1,13 @@ generic: { v60 = generic { version = "6.0.21"; - sha256 = "sha256-hdKPI5UEQvF/URH2eLWW32az3LMEse3UXIELOsfvwzk="; + hash = "sha256-hdKPI5UEQvF/URH2eLWW32az3LMEse3UXIELOsfvwzk="; vendorHash = null; }; v50 = generic { - version = "5.0.37"; - sha256 = "sha256-+C5fI+eMJKsynVnVJIYj27x1iFQwaG9Fnho0BXgENQI="; - vendorHash = "sha256-oSZBzIUL1yHXk7PnkSAlhI0i89aGMFrFHmbMN9rDAJ0="; + version = "5.0.41"; + hash = "sha256-pPvw0lPoK1IpsXc5c8Qu9zFhx2oHJz2bwiX80vrYa58="; + vendorHash = "sha256-qLDoNnEFiSrWXbLtYlmQaqY8Rv6JaG8WbMYBlry5Evc="; }; } diff --git a/pkgs/servers/monitoring/zabbix/web.nix b/pkgs/servers/monitoring/zabbix/web.nix index cbd095e234cc..7267e3046dd7 100644 --- a/pkgs/servers/monitoring/zabbix/web.nix +++ b/pkgs/servers/monitoring/zabbix/web.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchurl, writeText }: -import ./versions.nix ({ version, sha256, ... }: +import ./versions.nix ({ version, hash, ... }: stdenv.mkDerivation rec { pname = "zabbix-web"; inherit version; src = fetchurl { url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz"; - inherit sha256; + inherit hash; }; phpConfig = writeText "zabbix.conf.php" '' From 01134358a0b3fe2792204bb61098a6b592fc6348 Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Sat, 24 Feb 2024 14:52:07 +0100 Subject: [PATCH 20/40] zabbix60: 6.0.21 -> 6.0.26 Fixes CVE-2024-22119 / https://support.zabbix.com/browse/ZBX-24070 Changes: https://www.zabbix.com/rn/rn6.0.26 https://www.zabbix.com/rn/rn6.0.25 https://www.zabbix.com/rn/rn6.0.24 https://www.zabbix.com/rn/rn6.0.23 https://www.zabbix.com/rn/rn6.0.22 --- pkgs/servers/monitoring/zabbix/versions.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/zabbix/versions.nix b/pkgs/servers/monitoring/zabbix/versions.nix index a106edbf9056..6fe89a17c357 100644 --- a/pkgs/servers/monitoring/zabbix/versions.nix +++ b/pkgs/servers/monitoring/zabbix/versions.nix @@ -1,7 +1,7 @@ generic: { v60 = generic { - version = "6.0.21"; - hash = "sha256-hdKPI5UEQvF/URH2eLWW32az3LMEse3UXIELOsfvwzk="; + version = "6.0.26"; + hash = "sha256-MIOKe5hqfDecB1oWZKzbFmJCsQLuAGtp21l2WxxVG+g="; vendorHash = null; }; From 3ec2275f08950e9e51fe1b26224bfb2932df5ee4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 24 Feb 2024 16:05:24 +0100 Subject: [PATCH 21/40] python311Packages.orbax-checkpoint: init at 0.5.3 Orbax provides common utility libraries for JAX users https://github.com/google/orbax/tree/main/checkpoint --- .../orbax-checkpoint/default.nix | 78 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 80 insertions(+) create mode 100644 pkgs/development/python-modules/orbax-checkpoint/default.nix diff --git a/pkgs/development/python-modules/orbax-checkpoint/default.nix b/pkgs/development/python-modules/orbax-checkpoint/default.nix new file mode 100644 index 000000000000..0f9d467335ce --- /dev/null +++ b/pkgs/development/python-modules/orbax-checkpoint/default.nix @@ -0,0 +1,78 @@ +{ lib +, absl-py +, buildPythonPackage +, cached-property +, etils +, fetchPypi +, flit-core +, importlib-resources +, jax +, jaxlib +, msgpack +, nest-asyncio +, numpy +, protobuf +, pytest-xdist +, pytestCheckHook +, pythonOlder +, pyyaml +, tensorstore +, typing-extensions +}: + +buildPythonPackage rec { + pname = "orbax-checkpoint"; + version = "0.5.3"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchPypi { + pname = "orbax_checkpoint"; + inherit version; + hash = "sha256-FXKQTLv+hROSfg2A+AtzDg7y9oAzLTwoENhENTKTi0U="; + }; + + nativeBuildInputs = [ + flit-core + ]; + + propagatedBuildInputs = [ + absl-py + cached-property + etils + importlib-resources + jax + jaxlib + msgpack + nest-asyncio + numpy + protobuf + pyyaml + tensorstore + typing-extensions + ]; + + nativeCheckInputs = [ + pytest-xdist + pytestCheckHook + ]; + + pythonImportsCheck = [ + "orbax" + ]; + + disabledTestPaths = [ + # Circular dependency flax + "orbax/checkpoint/transform_utils_test.py" + "orbax/checkpoint/utils_test.py" + ]; + + meta = with lib; { + description = "Orbax provides common utility libraries for JAX users"; + homepage = "https://github.com/google/orbax/tree/main/checkpoint"; + changelog = "https://github.com/google/orbax/blob/${version}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b50984ad81ce..8f3be68d30a5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8932,6 +8932,8 @@ self: super: with self; { oras = callPackage ../development/python-modules/oras { }; + orbax-checkpoint = callPackage ../development/python-modules/orbax-checkpoint { }; + orderedmultidict = callPackage ../development/python-modules/orderedmultidict { }; ordered-set = callPackage ../development/python-modules/ordered-set { }; From c13699ad67cdcb0a5cf1a3cc6963a5806253f052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 25 Feb 2024 04:06:45 +0100 Subject: [PATCH 22/40] paperless-ngx: 2.5.2 -> 2.5.3 --- pkgs/applications/office/paperless-ngx/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/office/paperless-ngx/default.nix b/pkgs/applications/office/paperless-ngx/default.nix index 319234289515..bd99d093b097 100644 --- a/pkgs/applications/office/paperless-ngx/default.nix +++ b/pkgs/applications/office/paperless-ngx/default.nix @@ -22,13 +22,13 @@ }: let - version = "2.5.2"; + version = "2.5.3"; src = fetchFromGitHub { owner = "paperless-ngx"; repo = "paperless-ngx"; rev = "refs/tags/v${version}"; - hash = "sha256-v6k9clKNBNb2MQp0BTrUL9zfY6SUKfzaaOycmV8RKyk="; + hash = "sha256-fZ5grVZjCVkCH6doeqBLHPh9mPvHkiz+QXi/OyoJhR4="; }; python = python3; @@ -280,7 +280,7 @@ python.pkgs.buildPythonApplication rec { # Disable unneeded code coverage test substituteInPlace src/setup.cfg \ - --replace "--cov --cov-report=html --cov-report=xml" "" + --replace-fail "--cov --cov-report=html --cov-report=xml" "" ''; disabledTests = [ From 11cc6bd7988224e1c41e4af7547e5f788cd963f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 25 Feb 2024 04:08:08 +0100 Subject: [PATCH 23/40] paperless-ngx: cleanup dependencies --- .../office/paperless-ngx/default.nix | 78 +------------------ 1 file changed, 4 insertions(+), 74 deletions(-) diff --git a/pkgs/applications/office/paperless-ngx/default.nix b/pkgs/applications/office/paperless-ngx/default.nix index bd99d093b097..704689e20282 100644 --- a/pkgs/applications/office/paperless-ngx/default.nix +++ b/pkgs/applications/office/paperless-ngx/default.nix @@ -99,30 +99,12 @@ python.pkgs.buildPythonApplication rec { ]; propagatedBuildInputs = with python.pkgs; [ - amqp - anyio - asgiref - async-timeout - attrs - autobahn - automat - billiard bleach - celery - certifi - cffi - channels-redis channels - charset-normalizer - click - click-didyoumean - click-plugins - click-repl - coloredlogs + channels-redis concurrent-log-handler - constantly - cryptography dateparser + django django-allauth django-auditlog django-celery-results @@ -132,92 +114,41 @@ python.pkgs.buildPythonApplication rec { django-filter django-guardian django-multiselectfield - django - djangorestframework-guardian2 djangorestframework + djangorestframework-guardian2 drf-writable-nested filelock flower gotenberg-client gunicorn - h11 - h2 - hiredis - httptools - httpx - humanfriendly - humanize - hyperlink - idna imap-tools - img2pdf - incremental - inotify-simple inotifyrecursive - joblib langdetect - lxml - msgpack mysqlclient nltk ocrmypdf - packaging pathvalidate pdf2image - pikepdf - pillow - pluggy - portalocker - prompt-toolkit psycopg2 - pyasn1-modules - pyasn1 - pycparser - pyopenssl python-dateutil python-dotenv + python-gnupg python-ipware python-magic - python-gnupg - pytz - pyyaml pyzbar rapidfuzz redis - regex - reportlab - requests scikit-learn - scipy setproctitle - service-identity - sniffio - sqlparse - threadpoolctl tika-client - tornado tqdm - twisted - txaio - tzdata - tzlocal - urllib3 uvicorn - uvloop - vine watchdog - watchfiles - wcwidth - webencodings - websockets whitenoise whoosh - zipp - zope-interface zxing-cpp ] ++ redis.optional-dependencies.hiredis - ++ twisted.optional-dependencies.tls ++ uvicorn.optional-dependencies.standard; postBuild = '' @@ -262,7 +193,6 @@ python.pkgs.buildPythonApplication rec { pytest-rerunfailures pytest-xdist pytestCheckHook - reportlab ]; pytestFlagsArray = [ From a96d58f5f764f51b6b746f347275fbc43e1ec387 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Feb 2024 11:10:15 +0100 Subject: [PATCH 24/40] python312Packages.http-message-signatures: 0.4.4 -> 0.5.0 Diff: https://github.com/pyauth/http-message-signatures/compare/v0.4.4...v0.5.0 --- .../python-modules/http-message-signatures/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/http-message-signatures/default.nix b/pkgs/development/python-modules/http-message-signatures/default.nix index bc3351feb3d8..b9ccede6714e 100644 --- a/pkgs/development/python-modules/http-message-signatures/default.nix +++ b/pkgs/development/python-modules/http-message-signatures/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "http-message-signatures"; - version = "0.4.4"; + version = "0.5.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "pyauth"; repo = pname; rev = "v${version}"; - hash = "sha256-acTziJM5H5Td+eG/LNrlNwgpVvFDyl/tf6//YuE1XZk="; + hash = "sha256-Jsivw4lNA/2oqsOGGx8D4gUPftzuys877A9RXyapnSQ="; }; nativeBuildInputs = [ From 7a0bebd7c1ec3beb6edc741d83df06d142b4bbc6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Feb 2024 11:15:18 +0100 Subject: [PATCH 25/40] python311Packages.pyunifiprotect: 4.23.3 -> 4.23.4 Diff: https://github.com/briis/pyunifiprotect/compare/refs/tags/v4.23.3...v4.23.4 Changelog: https://github.com/AngellusMortis/pyunifiprotect/releases/tag/v4.23.4 --- pkgs/development/python-modules/pyunifiprotect/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyunifiprotect/default.nix b/pkgs/development/python-modules/pyunifiprotect/default.nix index cc846a024d8e..79b940d5be1d 100644 --- a/pkgs/development/python-modules/pyunifiprotect/default.nix +++ b/pkgs/development/python-modules/pyunifiprotect/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { pname = "pyunifiprotect"; - version = "4.23.3"; + version = "4.23.4"; pyproject = true; disabled = pythonOlder "3.9"; @@ -41,7 +41,7 @@ buildPythonPackage rec { owner = "briis"; repo = "pyunifiprotect"; rev = "refs/tags/v${version}"; - hash = "sha256-QWIiBuKDhSNYVyEm45QV4a2UxADDrBdiCBeJI+a6v7c="; + hash = "sha256-sBdu4XJkEtHf6dlHgJKFQvONp1x89NiS2EgxMiJFX7A="; }; env.SETUPTOOLS_SCM_PRETEND_VERSION = version; From 764f14dc9279dfcaba74e4ea35353830ae0d69ec Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Feb 2024 12:17:50 +0100 Subject: [PATCH 26/40] aws-sam-cli: refactor --- .../development/tools/aws-sam-cli/default.nix | 47 ++++++++++--------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/pkgs/development/tools/aws-sam-cli/default.nix b/pkgs/development/tools/aws-sam-cli/default.nix index 45c3e4c62a7a..3b6c702912fb 100644 --- a/pkgs/development/tools/aws-sam-cli/default.nix +++ b/pkgs/development/tools/aws-sam-cli/default.nix @@ -11,7 +11,7 @@ python3.pkgs.buildPythonApplication rec { pname = "aws-sam-cli"; version = "1.108.0"; - format = "pyproject"; + pyproject = true; disabled = python3.pythonOlder "3.8"; @@ -28,16 +28,16 @@ python3.pkgs.buildPythonApplication rec { ]; pythonRelaxDeps = [ + "aws-lambda-builders" "aws-sam-translator" "boto3-stubs" "cfn-lint" - "tzlocal" "cookiecutter" "docker" - "aws-lambda-builders" - "tomlkit" - "rich" "jsonschema" + "rich" + "tomlkit" + "tzlocal" ]; propagatedBuildInputs = with python3.pkgs; [ @@ -86,8 +86,6 @@ python3.pkgs.buildPythonApplication rec { --prefix PATH : $out/bin:${lib.makeBinPath [ git ]} ''; - doCheck = true; - nativeCheckInputs = with python3.pkgs; [ filelock flaky @@ -105,22 +103,27 @@ python3.pkgs.buildPythonApplication rec { pytestFlagsArray = [ "tests" - - # Disable tests that requires networking or complex setup - "--ignore=tests/end_to_end" - "--ignore=tests/integration" - "--ignore=tests/regression" - "--ignore=tests/smoke" - "--ignore=tests/unit/lib/telemetry" - - # Disable flaky tests - "--ignore=tests/unit/lib/samconfig/test_samconfig.py" - "--deselect=tests/unit/lib/sync/flows/test_rest_api_sync_flow.py::TestRestApiSyncFlow::test_update_stage" - "--deselect=tests/unit/lib/sync/flows/test_rest_api_sync_flow.py::TestRestApiSyncFlow::test_delete_deployment" - "--deselect=tests/unit/local/lambda_service/test_local_lambda_invoke_service.py::TestValidateRequestHandling::test_request_with_no_data" - # Disable warnings - "-W ignore::DeprecationWarning" + "-W" + "ignore::DeprecationWarning" + ]; + + disabledTestPaths = [ + # Disable tests that requires networking or complex setup + "tests/end_to_end" + "tests/integration" + "tests/regression" + "tests/smoke" + "tests/unit/lib/telemetry" + # Disable flaky tests + "tests/unit/lib/samconfig/test_samconfig.py" + ]; + + disabledTests = [ + # Disable flaky tests + "test_update_stage" + "test_delete_deployment" + "test_request_with_no_data" ]; pythonImportsCheck = [ From 24eabec84c59efd1d893c2aa1ce9b9f22064dd8b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Feb 2024 12:20:13 +0100 Subject: [PATCH 27/40] aws-sam-cli: 1.108.0 -> 1.110.0 Changelog: https://github.com/aws/aws-sam-cli/releases/tag/v1.110.0 --- pkgs/development/tools/aws-sam-cli/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/aws-sam-cli/default.nix b/pkgs/development/tools/aws-sam-cli/default.nix index 3b6c702912fb..5ab92dbe8b18 100644 --- a/pkgs/development/tools/aws-sam-cli/default.nix +++ b/pkgs/development/tools/aws-sam-cli/default.nix @@ -10,7 +10,7 @@ python3.pkgs.buildPythonApplication rec { pname = "aws-sam-cli"; - version = "1.108.0"; + version = "1.110.0"; pyproject = true; disabled = python3.pythonOlder "3.8"; @@ -19,7 +19,7 @@ python3.pkgs.buildPythonApplication rec { owner = "aws"; repo = "aws-sam-cli"; rev = "refs/tags/v${version}"; - hash = "sha256-k6SXCFkISyfr5/0vhe/Dfzs4qsVfu14lFx/bl53QxR4="; + hash = "sha256-FJHHEsdi2uGP9/GxrANsVEuxZiS4M4BPBGoARQBQpkA="; }; nativeBuildInputs = with python3.pkgs; [ @@ -35,7 +35,9 @@ python3.pkgs.buildPythonApplication rec { "cookiecutter" "docker" "jsonschema" + "pyopenssl" "rich" + "ruamel-yaml" "tomlkit" "tzlocal" ]; From 8f4e78e85df4d6520edbae8edcf7fd876be10a63 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 24 Feb 2024 21:44:38 +0000 Subject: [PATCH 28/40] ton: 2023.10 -> 2024.01 Without the change the build fails on `master` as https://hydra.nixos.org/build/249007752: In file included from /build/source/third-party/rocksdb/table/block_based/data_block_hash_index.cc:9: /build/source/third-party/rocksdb/table/block_based/data_block_hash_index.h:65:7: error: 'uint8_t' does not name a type 65 | const uint8_t kNoEntry = 255; | ^~~~~~~ --- pkgs/applications/blockchains/ton/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/blockchains/ton/default.nix b/pkgs/applications/blockchains/ton/default.nix index a65a1428df0e..0d4d3826b7e7 100644 --- a/pkgs/applications/blockchains/ton/default.nix +++ b/pkgs/applications/blockchains/ton/default.nix @@ -6,21 +6,23 @@ , pkg-config , gperf , libmicrohttpd +, libsodium , openssl , readline +, secp256k1 , zlib , nix-update-script }: stdenv.mkDerivation rec { pname = "ton"; - version = "2023.10"; + version = "2024.01"; src = fetchFromGitHub { owner = "ton-blockchain"; repo = "ton"; rev = "v${version}"; - sha256 = "sha256-K1RhhW7EvwYV7/ng3NPjSGdHEQvJZ7K97YXd7s5wghc="; + hash = "sha256-nZ7yel+lTNO5zFzN711tLwAvqpf5qaYOxERwApnMVOs="; fetchSubmodules = true; }; @@ -35,14 +37,19 @@ stdenv.mkDerivation rec { buildInputs = [ gperf libmicrohttpd + libsodium openssl readline + secp256k1 zlib ]; passthru.updateScript = nix-update-script { }; meta = with lib; { + # The build fails on darwin as: + # error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer + broken = stdenv.isDarwin; description = "A fully decentralized layer-1 blockchain designed by Telegram"; homepage = "https://ton.org/"; changelog = "https://github.com/ton-blockchain/ton/blob/v${version}/Changelog.md"; From 201096554c8a73e5b9fef0be7f167ef6319c9a7d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 25 Feb 2024 12:33:43 +0000 Subject: [PATCH 29/40] kodiPackages.youtube: 7.0.2.2 -> 7.0.3 --- pkgs/applications/video/kodi/addons/youtube/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/kodi/addons/youtube/default.nix b/pkgs/applications/video/kodi/addons/youtube/default.nix index 3d3683ed8776..d6bc80d0189e 100644 --- a/pkgs/applications/video/kodi/addons/youtube/default.nix +++ b/pkgs/applications/video/kodi/addons/youtube/default.nix @@ -3,13 +3,13 @@ buildKodiAddon rec { pname = "youtube"; namespace = "plugin.video.youtube"; - version = "7.0.2.2"; + version = "7.0.3"; src = fetchFromGitHub { owner = "anxdpanic"; repo = "plugin.video.youtube"; rev = "v${version}"; - hash = "sha256-BUeE/8oQYBiq4XgIp4nv0hjEQz3nnkDWCnAf4kpptwk="; + hash = "sha256-dD9jl/W8RDfYHv13TBniOeRyc4cocj8160BHWz3MKlE="; }; propagatedBuildInputs = [ From b89a109b351996544b853323444ddf983846296a Mon Sep 17 00:00:00 2001 From: emilylange Date: Sun, 25 Feb 2024 17:12:26 +0100 Subject: [PATCH 30/40] drone-runner-docker: remove emilylange from maintainers I am no longer willing to maintain drone-runner-docker or any other Drone CI related software. --- .../continuous-integration/drone-runner-docker/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/continuous-integration/drone-runner-docker/default.nix b/pkgs/development/tools/continuous-integration/drone-runner-docker/default.nix index 974cd8f464cb..e4fc56d74ff2 100644 --- a/pkgs/development/tools/continuous-integration/drone-runner-docker/default.nix +++ b/pkgs/development/tools/continuous-integration/drone-runner-docker/default.nix @@ -14,7 +14,7 @@ buildGoModule rec { vendorHash = "sha256-KcNp3VdJ201oxzF0bLXY4xWHqHNz54ZrVSI96cfhU+k="; meta = with lib; { - maintainers = with maintainers; [ endocrimes emilylange ]; + maintainers = with maintainers; [ endocrimes ]; license = licenses.unfreeRedistributable; homepage = "https://github.com/drone-runners/drone-runner-docker"; description = "Drone pipeline runner that executes builds inside Docker containers"; From 10c04c8796226848899db0aac741cf91d8d85483 Mon Sep 17 00:00:00 2001 From: Jose Cardoso <65740649+asininemonkey@users.noreply.github.com> Date: Sun, 25 Feb 2024 16:21:45 +0000 Subject: [PATCH 31/40] maintainers: add asininemonkey --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index e920193f271e..733b196bc0e8 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1743,6 +1743,12 @@ githubId = 113123021; name = "Ashvith Shetty"; }; + asininemonkey = { + email = "nixpkgs@asininemonkey.com"; + github = "asininemonkey"; + githubId = 65740649; + name = "Jose Cardoso"; + }; aske = { email = "aske@fmap.me"; github = "aske"; From cdd5ddbd085ccd4feb8b983f99d49a49e0664303 Mon Sep 17 00:00:00 2001 From: Jose Cardoso <65740649+asininemonkey@users.noreply.github.com> Date: Sun, 25 Feb 2024 16:24:50 +0000 Subject: [PATCH 32/40] arcticons-sans: init at 0.580 --- pkgs/by-name/ar/arcticons-sans/package.nix | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pkgs/by-name/ar/arcticons-sans/package.nix diff --git a/pkgs/by-name/ar/arcticons-sans/package.nix b/pkgs/by-name/ar/arcticons-sans/package.nix new file mode 100644 index 000000000000..fb743aceee5c --- /dev/null +++ b/pkgs/by-name/ar/arcticons-sans/package.nix @@ -0,0 +1,29 @@ +{ lib +, stdenvNoCC +, fetchzip +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "arcticons-sans"; + version = "0.580"; + + src = fetchzip { + hash = "sha256-BRyYHOuz7zxD1zD4L4DmI9dFhGePmGFDqYmS0DIbvi8="; + url = "https://github.com/arcticons-team/arcticons-font/archive/refs/tags/${finalAttrs.version}.zip"; + }; + + installPhase = '' + runHook preInstall + + install -D -m444 -t $out/share/fonts/opentype $src/*.otf + + runHook postInstall + ''; + + meta = { + description = "Arcticons Sans"; + homepage = "https://github.com/arcticons-team/arcticons-font"; + license = lib.licenses.ofl; + maintainers = with lib.maintainers; [ asininemonkey ]; + }; +}) From 84e89be710698cf68c06ab97ce296e2f9eaf3e12 Mon Sep 17 00:00:00 2001 From: Hraban Luyat Date: Sun, 25 Feb 2024 12:23:58 -0500 Subject: [PATCH 33/40] sbcl: set source provenance on binary bootstrap Fixes nixos/nixpkgs#282476 --- pkgs/development/compilers/sbcl/bootstrap.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/compilers/sbcl/bootstrap.nix b/pkgs/development/compilers/sbcl/bootstrap.nix index e23557c5a62f..d796b24e1d7e 100644 --- a/pkgs/development/compilers/sbcl/bootstrap.nix +++ b/pkgs/development/compilers/sbcl/bootstrap.nix @@ -26,4 +26,6 @@ stdenv.mkDerivation rec { postFixup = lib.optionalString (!stdenv.isAarch32 && stdenv.isLinux) '' patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl ''; + + meta.sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; } From a52e27d4f637854e81dfd51da3b29627f7374513 Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Tue, 20 Feb 2024 20:04:43 +0100 Subject: [PATCH 34/40] nixos/hardware/printers: fix empty ppdOptions --- nixos/modules/hardware/printers.nix | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/nixos/modules/hardware/printers.nix b/nixos/modules/hardware/printers.nix index 846ff6f3fb4f..4fb6a192cdd2 100644 --- a/nixos/modules/hardware/printers.nix +++ b/nixos/modules/hardware/printers.nix @@ -2,18 +2,23 @@ with lib; let cfg = config.hardware.printers; - ppdOptionsString = options: optionalString (options != {}) - (concatStringsSep " " - (mapAttrsToList (name: value: "-o '${name}'='${value}'") options) - ); - ensurePrinter = p: '' - ${pkgs.cups}/bin/lpadmin -p '${p.name}' -E \ - ${optionalString (p.location != null) "-L '${p.location}'"} \ - ${optionalString (p.description != null) "-D '${p.description}'"} \ - -v '${p.deviceUri}' \ - -m '${p.model}' \ - ${ppdOptionsString p.ppdOptions} + + ensurePrinter = p: let + args = cli.toGNUCommandLineShell {} ({ + p = p.name; + v = p.deviceUri; + m = p.model; + } // optionalAttrs (p.location != null) { + L = p.location; + } // optionalAttrs (p.description != null) { + D = p.description; + } // optionalAttrs (p.ppdOptions != {}) { + o = mapAttrsToList (name: value: "'${name}'='${value}'") p.ppdOptions; + }); + in '' + ${pkgs.cups}/bin/lpadmin ${args} -E ''; + ensureDefaultPrinter = name: '' ${pkgs.cups}/bin/lpadmin -d '${name}' ''; From ac85b4b653439b3ad491748a36c6d2bde1f5fa77 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Feb 2024 19:50:38 +0100 Subject: [PATCH 35/40] python311Packages.dask-awkward: adjust inputs (#291337) --- .../python-modules/dask-awkward/default.nix | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dask-awkward/default.nix b/pkgs/development/python-modules/dask-awkward/default.nix index 0875430cc383..c1a944414f6d 100644 --- a/pkgs/development/python-modules/dask-awkward/default.nix +++ b/pkgs/development/python-modules/dask-awkward/default.nix @@ -2,13 +2,19 @@ , awkward , buildPythonPackage , dask +, dask-histogram +, distributed , fetchFromGitHub , hatch-vcs , hatchling +, hist +, pandas , pyarrow , pytestCheckHook , pythonOlder , pythonRelaxDepsHook +, typing-extensions +, uproot }: buildPythonPackage rec { @@ -38,12 +44,23 @@ buildPythonPackage rec { propagatedBuildInputs = [ awkward dask + typing-extensions ]; + passthru.optional-dependencies = { + io = [ + pyarrow + ]; + }; + checkInputs = [ + dask-histogram + distributed + hist + pandas pytestCheckHook - pyarrow - ]; + uproot + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); pythonImportsCheck = [ "dask_awkward" @@ -54,6 +71,8 @@ buildPythonPackage rec { "test_remote_double" "test_remote_single" "test_from_text" + # ValueError: not a ROOT file: first four bytes... + "test_basic_root_works" ]; meta = with lib; { From 6bef3517593e1782c9877b6b1dfa13ce530ead21 Mon Sep 17 00:00:00 2001 From: h3ndrik Date: Sun, 25 Feb 2024 20:39:25 +0100 Subject: [PATCH 36/40] snapcast: compile with opus codec support (#291014) --- pkgs/applications/audio/snapcast/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/snapcast/default.nix b/pkgs/applications/audio/snapcast/default.nix index d155afb99ba4..782a55864914 100644 --- a/pkgs/applications/audio/snapcast/default.nix +++ b/pkgs/applications/audio/snapcast/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, fetchpatch, cmake, pkg-config -, alsa-lib, asio, avahi, boost179, flac, libogg, libvorbis, soxr +, alsa-lib, asio, avahi, boost179, flac, libogg, libvorbis, libopus, soxr , IOKit, AudioToolbox , aixlog, popl , pulseaudioSupport ? false, libpulseaudio @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { # not needed buildInputs = [ boost179 - asio avahi flac libogg libvorbis + asio avahi flac libogg libvorbis libopus aixlog popl soxr ] ++ lib.optional pulseaudioSupport libpulseaudio ++ lib.optional stdenv.isLinux alsa-lib From b79beadd1e07f196e082321b321aa46ce2a271d7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 19 Feb 2024 05:06:19 +0100 Subject: [PATCH 37/40] opencv4: 4.7.0 -> 4.9.0 https://github.com/opencv/opencv/wiki/ChangeLog#version490 --- pkgs/development/libraries/opencv/4.x.nix | 202 +++++++++++++--------- 1 file changed, 119 insertions(+), 83 deletions(-) diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index 7bb2649ff894..2f24d984c062 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -2,14 +2,14 @@ , stdenv , fetchurl , fetchFromGitHub -, fetchpatch , cmake , pkg-config , unzip , zlib -, pcre +, pcre2 , hdf5 , boost +, glib , gflags , protobuf_21 , config @@ -35,6 +35,8 @@ , eigen , enableBlas ? true , blas +, enableVA ? !stdenv.isDarwin +, libva , enableContrib ? true , enableCuda ? config.cudaSupport @@ -58,7 +60,11 @@ , enableFfmpeg ? true , ffmpeg , enableGStreamer ? true +, elfutils , gst_all_1 +, orc +, libunwind +, zstd , enableTesseract ? false , tesseract , leptonica @@ -85,7 +91,7 @@ }@inputs: let - version = "4.7.0"; + version = "4.9.0"; # It's necessary to consistently use backendStdenv when building with CUDA # support, otherwise we get libstdc++ errors downstream @@ -96,21 +102,21 @@ let owner = "opencv"; repo = "opencv"; rev = version; - sha256 = "sha256-jUeGsu8+jzzCnIFbVMCW8DcUeGv/t1yCY/WXyW+uGDI="; + hash = "sha256-3qqu4xlRyMbPKHHTIT+iRRGtpFlcv0NU8GNZpgjdi6k="; }; contribSrc = fetchFromGitHub { owner = "opencv"; repo = "opencv_contrib"; rev = version; - sha256 = "sha256-meya0J3RdOIeMM46e/6IOVwrKn3t/c0rhwP2WQaybkE="; + hash = "sha256-K74Ghk4uDqj4OWEzDxT2R3ERi+jkAWZszzezRenfuZ8="; }; testDataSrc = fetchFromGitHub { owner = "opencv"; repo = "opencv_extra"; rev = version; - sha256 = "sha256-6hAdJdaUgtRGQanQKuY/q6fcXWXFZ3K/oLbGxvksry0="; + hash = "sha256-pActKi7aN5EOZq2Fpf5mALnZq71c037/R3Q6wJ4uCfQ="; }; # Contrib must be built in order to enable Tesseract support: @@ -121,16 +127,16 @@ let src = fetchFromGitHub { owner = "opencv"; repo = "opencv_3rdparty"; - rev = "a56b6ac6f030c312b2dce17430eef13aed9af274"; - sha256 = "1msbkc3zixx61rcg6a04i1bcfhw1phgsrh93glq1n80hgsk3nbjq"; + rev = "0cc4aa06bf2bef4b05d237c69a5a96b9cd0cb85a"; + hash = "sha256-/kHivOgCkY9YdcRRaVgytXal3ChE9xFfGAB0CfFO5ec="; } + "/ippicv"; - files = let name = platform: "ippicv_2019_${platform}_general_20180723.tgz"; in + files = let name = platform: "ippicv_2021.10.0_${platform}_20230919_general.tgz"; in if effectiveStdenv.hostPlatform.system == "x86_64-linux" then - { ${name "lnx_intel64"} = "c0bd78adb4156bbf552c1dfe90599607"; } + { ${name "lnx_intel64"} = "606a19b207ebedfe42d59fd916cc4850"; } else if effectiveStdenv.hostPlatform.system == "i686-linux" then - { ${name "lnx_ia32"} = "4f38432c30bfd6423164b7a24bbc98a0"; } + { ${name "lnx_ia32"} = "ea08487b810baad2f68aca87b74a2db9"; } else if effectiveStdenv.hostPlatform.system == "x86_64-darwin" then - { ${name "mac_intel64"} = "fe6b2bb75ae0e3f19ad3ae1a31dfa4a2"; } + { ${name "mac_intel64"} = "14f01c5a4780bfae9dde9b0aaf5e56fc"; } else throw "ICV is not available for this platform (or not yet supported by this package)"; dst = ".cache/ippicv"; @@ -142,7 +148,7 @@ let owner = "opencv"; repo = "opencv_3rdparty"; rev = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"; - sha256 = "0r9fam8dplyqqsd3qgpnnfgf9l7lj44di19rxwbm8mxiw0rlcdvy"; + hash = "sha256-fjdGM+CxV1QX7zmF2AiR9NDknrP2PjyaxtjT21BVLmU="; }; files = { "vgg_generated_48.i" = "e8d0dcd54d1bcfdc29203d011a797179"; @@ -179,7 +185,7 @@ let owner = "opencv"; repo = "opencv_3rdparty"; rev = "8afa57abc8229d611c4937165d20e2a2d9fc5a12"; - sha256 = "061lsvqdidq9xa2hwrcvwi9ixflr2c2lfpc8drr159g68zi8bp4v"; + hash = "sha256-m9yF4kfmpRJybohdRwUTmboeU+SbZQ6F6gm32PDWNBg="; }; files = { "face_landmark_model.dat" = "7505c44ca4eb54b4ab1e4777cb96ac05"; @@ -191,10 +197,10 @@ let ade = rec { src = fetchurl { url = "https://github.com/opencv/ade/archive/${name}"; - sha256 = "sha256-TjLRbFbC7MDY9PxIy560ryviBI58cbQwqgc7A7uOHkg="; + hash = "sha256-WG/GudVpkO10kOJhoKXFMj672kggvyRYCIpezal3wcE="; }; - name = "v0.1.2a.zip"; - md5 = "fa4b3e25167319cb0fa9432ef8281945"; + name = "v0.1.2d.zip"; + md5 = "dbb095a8bf3008e91edbbf45d8d34885"; dst = ".cache/ade"; }; @@ -204,7 +210,7 @@ let owner = "opencv"; repo = "opencv_3rdparty"; rev = "a8b69ccc738421293254aec5ddb38bd523503252"; - sha256 = "sha256-/n6zHwf0Rdc4v9o4rmETzow/HTv+81DnHP+nL56XiTY="; + hash = "sha256-/n6zHwf0Rdc4v9o4rmETzow/HTv+81DnHP+nL56XiTY="; }; files = { "detect.caffemodel" = "238e2b2d6f3c18d6c3a30de0c31e23cf"; @@ -260,20 +266,6 @@ effectiveStdenv.mkDerivation { patches = [ ./cmake-don-t-use-OpenCVFindOpenEXR.patch ] ++ lib.optionals enableContrib [ - (fetchpatch { - name = "CVE-2023-2617.patch"; - url = "https://github.com/opencv/opencv_contrib/commit/ccc277247ac1a7aef0a90353edcdec35fbc5903c.patch"; - stripLen = 2; - extraPrefix = [ "opencv_contrib/" ]; - sha256 = "sha256-drZ+DVn+Pk4zAZJ+LgX5u3Tz7MU0AEI/73EVvxDP3AU="; - }) - (fetchpatch { - name = "CVE-2023-2618.patch"; - url = "https://github.com/opencv/opencv_contrib/commit/ec406fa4748fb4b0630c1b986469e7918d5e8953.patch"; - stripLen = 2; - extraPrefix = [ "opencv_contrib/" ]; - sha256 = "sha256-cB5Tsh2fDOsc0BNtSzd6U/QoCjkd9yMW1QutUU69JJ0="; - }) ] ++ lib.optional enableCuda ./cuda_opt_flow.patch; # This prevents cmake from using libraries in impure paths (which @@ -300,60 +292,104 @@ effectiveStdenv.mkDerivation { echo '"(build info elided)"' > modules/core/version_string.inc ''; - buildInputs = [ zlib pcre boost gflags protobuf_21 ] - ++ lib.optional enablePython pythonPackages.python - ++ lib.optional (effectiveStdenv.buildPlatform == effectiveStdenv.hostPlatform) hdf5 - ++ lib.optional enableGtk2 gtk2 - ++ lib.optional enableGtk3 gtk3 - ++ lib.optional enableVtk vtk - ++ lib.optional enableJPEG libjpeg - ++ lib.optional enablePNG libpng - ++ lib.optional enableTIFF libtiff - ++ lib.optional enableWebP libwebp - ++ lib.optionals enableEXR [ openexr ilmbase ] - ++ lib.optional enableJPEG2000 openjpeg - ++ lib.optional enableFfmpeg ffmpeg - ++ lib.optionals (enableFfmpeg && effectiveStdenv.isDarwin) - [ VideoDecodeAcceleration bzip2 ] - ++ lib.optionals enableGStreamer (with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good ]) - ++ lib.optional enableOvis ogre - ++ lib.optional enableGPhoto2 libgphoto2 - ++ lib.optional enableDC1394 libdc1394 - ++ lib.optional enableEigen eigen - ++ lib.optional enableBlas blas.provider + buildInputs = [ + boost + gflags + glib + pcre2 + protobuf_21 + zlib + ] ++ lib.optionals enablePython [ + pythonPackages.python + ] ++ lib.optionals (effectiveStdenv.buildPlatform == effectiveStdenv.hostPlatform) [ + hdf5 + ] ++ lib.optionals enableGtk2 [ + gtk2 + ] ++ lib.optionals enableGtk3 [ + gtk3 + ] ++ lib.optionals enableVtk [ + vtk + ] ++ lib.optionals enableJPEG [ + libjpeg + ] ++ lib.optionals enablePNG [ + libpng + ] ++ lib.optionals enableTIFF [ + libtiff + ] ++ lib.optionals enableWebP [ + libwebp + ] ++ lib.optionals enableEXR [ + openexr + ilmbase + ] ++ lib.optionals enableJPEG2000 [ + openjpeg + ] ++ lib.optionals enableFfmpeg [ + ffmpeg + ] ++ lib.optionals (enableFfmpeg && effectiveStdenv.isDarwin) [ + bzip2 + VideoDecodeAcceleration + ] ++ lib.optionals (enableGStreamer && effectiveStdenv.isLinux) (with gst_all_1; [ + elfutils + gst-plugins-base + gst-plugins-good + gstreamer + libunwind + orc + zstd + ]) ++ lib.optionals enableOvis [ + ogre + ] ++ lib.optionals enableGPhoto2 [ + libgphoto2 + ] ++ lib.optionals enableDC1394 [ + libdc1394 + ] ++ lib.optionals enableEigen [ + eigen + ] ++ lib.optionals enableVA [ + libva + ] ++ lib.optionals enableBlas [ + blas.provider + ] ++ lib.optionals enableTesseract [ # There is seemingly no compile-time flag for Tesseract. It's # simply enabled automatically if contrib is built, and it detects # tesseract & leptonica. - ++ lib.optionals enableTesseract [ tesseract leptonica ] - ++ lib.optional enableTbb tbb - ++ lib.optionals effectiveStdenv.isDarwin [ - bzip2 AVFoundation Cocoa VideoDecodeAcceleration CoreMedia MediaToolbox Accelerate - ] - ++ lib.optionals enableDocs [ doxygen graphviz-nox ] - ++ lib.optionals enableCuda (with cudaPackages; [ - cuda_cudart.lib - cuda_cudart.dev - cuda_cccl.dev # - libnpp.dev # npp.h - libnpp.lib - libnpp.static - nvidia-optical-flow-sdk - ] ++ lib.optionals enableCublas [ - # May start using the default $out instead once - # https://github.com/NixOS/nixpkgs/issues/271792 - # has been addressed - libcublas.static - libcublas.lib - libcublas.dev # cublas_v2.h - ] ++ lib.optionals enableCudnn [ - cudnn.dev # cudnn.h - cudnn.lib - cudnn.static - ] ++ lib.optionals enableCufft [ - libcufft.dev # cufft.h - libcufft.lib - libcufft.static - ]); + tesseract + leptonica + ] ++ lib.optionals enableTbb [ + tbb + ] ++ lib.optionals effectiveStdenv.isDarwin [ + bzip2 + AVFoundation + Cocoa + VideoDecodeAcceleration + CoreMedia + MediaToolbox + Accelerate + ] ++ lib.optionals enableDocs [ + doxygen + graphviz-nox + ] ++ lib.optionals enableCuda (with cudaPackages; [ + cuda_cudart.lib + cuda_cudart.dev + cuda_cccl.dev # + libnpp.dev # npp.h + libnpp.lib + libnpp.static + nvidia-optical-flow-sdk + ] ++ lib.optionals enableCublas [ + # May start using the default $out instead once + # https://github.com/NixOS/nixpkgs/issues/271792 + # has been addressed + libcublas.static + libcublas.lib + libcublas.dev # cublas_v2.h + ] ++ lib.optionals enableCudnn [ + cudnn.dev # cudnn.h + cudnn.lib + cudnn.static + ] ++ lib.optionals enableCufft [ + libcufft.dev # cufft.h + libcufft.lib + libcufft.static + ]); propagatedBuildInputs = lib.optionals enablePython [ pythonPackages.numpy ]; From c2563bc1ec2837e7fced3bbe78708a20f7466bd3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 24 Feb 2024 10:42:05 +0100 Subject: [PATCH 38/40] python312Packages.pillow-heif: fix build with clang --- pkgs/development/python-modules/pillow-heif/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/pillow-heif/default.nix b/pkgs/development/python-modules/pillow-heif/default.nix index 2496bd1b3609..33575ace5508 100644 --- a/pkgs/development/python-modules/pillow-heif/default.nix +++ b/pkgs/development/python-modules/pillow-heif/default.nix @@ -55,6 +55,9 @@ buildPythonPackage rec { x265 ]; + # clang-16: error: argument unused during compilation: '-fno-strict-overflow' [-Werror,-Wunused-command-line-argument] + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument"; + propagatedBuildInputs = [ pillow ]; From f43811ab19d925aea81c2de0959c79454b70062d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 20 Feb 2024 11:59:27 +0000 Subject: [PATCH 39/40] yubioath-flutter: 6.3.1 -> 6.4.0 --- .../misc/yubioath-flutter/default.nix | 7 ++- .../misc/yubioath-flutter/pubspec.lock.json | 51 ++++++++++--------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/pkgs/applications/misc/yubioath-flutter/default.nix b/pkgs/applications/misc/yubioath-flutter/default.nix index ce228abdbb22..2cc97405e3f0 100644 --- a/pkgs/applications/misc/yubioath-flutter/default.nix +++ b/pkgs/applications/misc/yubioath-flutter/default.nix @@ -13,18 +13,21 @@ flutter.buildFlutterApplication rec { pname = "yubioath-flutter"; - version = "6.3.1"; + version = "6.4.0"; src = fetchFromGitHub { owner = "Yubico"; repo = "yubioath-flutter"; rev = version; - hash = "sha256-XgRIX2Iv5niJw2NSBPwM0K4uF5sPj9c+Xj4oHtAQSbU="; + hash = "sha256-aXUnmKEUCi0rsVr3HVhEk6xa1z9HMsH+0AIY531hqiU="; }; passthru.helper = python3.pkgs.callPackage ./helper.nix { inherit src version meta; }; pubspecLock = lib.importJSON ./pubspec.lock.json; + gitHashes = { + window_manager = "sha256-mLX51nbWFccsAfcqLQIYDjYz69y9wAz4U1RZ8TIYSj0="; + }; postPatch = '' rm -f pubspec.lock diff --git a/pkgs/applications/misc/yubioath-flutter/pubspec.lock.json b/pkgs/applications/misc/yubioath-flutter/pubspec.lock.json index a1973fa9a752..c83c6ffb1caf 100644 --- a/pkgs/applications/misc/yubioath-flutter/pubspec.lock.json +++ b/pkgs/applications/misc/yubioath-flutter/pubspec.lock.json @@ -134,11 +134,11 @@ "dependency": "transitive", "description": { "name": "build_runner_core", - "sha256": "c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185", + "sha256": "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799", "url": "https://pub.dev" }, "source": "hosted", - "version": "7.2.11" + "version": "7.3.0" }, "built_collection": { "dependency": "transitive", @@ -154,11 +154,11 @@ "dependency": "transitive", "description": { "name": "built_value", - "sha256": "c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309", + "sha256": "a3ec2e0f967bc47f69f95009bb93db936288d61d5343b9436e378b28a2f830c6", "url": "https://pub.dev" }, "source": "hosted", - "version": "8.8.1" + "version": "8.9.0" }, "characters": { "dependency": "transitive", @@ -264,31 +264,31 @@ "dependency": "direct dev", "description": { "name": "custom_lint", - "sha256": "dfb893ff17c83cf08676c6b64df11d3e53d80590978d7c1fb242afff3ba6dedb", + "sha256": "f89ff83efdba7c8996e86bb3bad0b759d58f9b19ae4d0e277a386ddd8b481217", "url": "https://pub.dev" }, "source": "hosted", - "version": "0.5.8" + "version": "0.6.0" }, "custom_lint_builder": { "dependency": "direct dev", "description": { "name": "custom_lint_builder", - "sha256": "8df6634b38a36a6c6cb74a9c0eb02e9ba0b0ab89b29e38e6daa86e8ed2c6288d", + "sha256": "9cdd9987feaa6925ec5f98d64de4fbbb5d94248ff77bbf2489366efad6c4baef", "url": "https://pub.dev" }, "source": "hosted", - "version": "0.5.8" + "version": "0.6.0" }, "custom_lint_core": { "dependency": "transitive", "description": { "name": "custom_lint_core", - "sha256": "2b235be098d157e244f18ea905a15a18c16a205e30553888fac6544bbf52f03f", + "sha256": "9003a91409c9f1db6e2e50b4870d1d5e802e5923b25f7261bf3cb3e11ea9d4fb", "url": "https://pub.dev" }, "source": "hosted", - "version": "0.5.8" + "version": "0.6.0" }, "dart_style": { "dependency": "transitive", @@ -402,11 +402,11 @@ "dependency": "direct main", "description": { "name": "flutter_riverpod", - "sha256": "da9591d1f8d5881628ccd5c25c40e74fc3eef50ba45e40c3905a06e1712412d5", + "sha256": "4bce556b7ecbfea26109638d5237684538d4abc509d253e6c5c4c5733b360098", "url": "https://pub.dev" }, "source": "hosted", - "version": "2.4.9" + "version": "2.4.10" }, "flutter_test": { "dependency": "direct dev", @@ -424,11 +424,11 @@ "dependency": "direct dev", "description": { "name": "freezed", - "sha256": "6c5031daae12c7072b3a87eff98983076434b4889ef2a44384d0cae3f82372ba", + "sha256": "57247f692f35f068cae297549a46a9a097100685c6780fe67177503eea5ed4e5", "url": "https://pub.dev" }, "source": "hosted", - "version": "2.4.6" + "version": "2.4.7" }, "freezed_annotation": { "dependency": "direct main", @@ -645,11 +645,11 @@ "dependency": "transitive", "description": { "name": "mime", - "sha256": "e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e", + "sha256": "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2", "url": "https://pub.dev" }, "source": "hosted", - "version": "1.0.4" + "version": "1.0.5" }, "package_config": { "dependency": "transitive", @@ -834,11 +834,11 @@ "dependency": "transitive", "description": { "name": "riverpod", - "sha256": "942999ee48b899f8a46a860f1e13cee36f2f77609eb54c5b7a669bb20d550b11", + "sha256": "548e2192eb7aeb826eb89387f814edb76594f3363e2c0bb99dd733d795ba3589", "url": "https://pub.dev" }, "source": "hosted", - "version": "2.4.9" + "version": "2.5.0" }, "rxdart": { "dependency": "transitive", @@ -1119,11 +1119,11 @@ "dependency": "direct main", "description": { "name": "url_launcher", - "sha256": "d25bb0ca00432a5e1ee40e69c36c85863addf7cc45e433769d61bed3fe81fd96", + "sha256": "c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c", "url": "https://pub.dev" }, "source": "hosted", - "version": "6.2.3" + "version": "6.2.4" }, "url_launcher_android": { "dependency": "transitive", @@ -1308,12 +1308,13 @@ "window_manager": { "dependency": "direct main", "description": { - "name": "window_manager", - "sha256": "dcc865277f26a7dad263a47d0e405d77e21f12cb71f30333a52710a408690bd7", - "url": "https://pub.dev" + "path": ".", + "ref": "2272d45bcf46d7e2b452a038906fbc85df3ce83d", + "resolved-ref": "2272d45bcf46d7e2b452a038906fbc85df3ce83d", + "url": "https://github.com/fdennis/window_manager.git" }, - "source": "hosted", - "version": "0.3.7" + "source": "git", + "version": "0.3.8" }, "xdg_directories": { "dependency": "transitive", From b4728c471861953c1c845c15512df5fba0cf020d Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 25 Feb 2024 22:47:02 +0000 Subject: [PATCH 40/40] yubioath-flutter: substituteInPlace replace to replace-fail --- pkgs/applications/misc/yubioath-flutter/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/yubioath-flutter/default.nix b/pkgs/applications/misc/yubioath-flutter/default.nix index 2cc97405e3f0..4895f749ec8d 100644 --- a/pkgs/applications/misc/yubioath-flutter/default.nix +++ b/pkgs/applications/misc/yubioath-flutter/default.nix @@ -33,7 +33,7 @@ flutter.buildFlutterApplication rec { rm -f pubspec.lock substituteInPlace linux/CMakeLists.txt \ - --replace "../build/linux/helper" "${passthru.helper}/libexec/helper" + --replace-fail "../build/linux/helper" "${passthru.helper}/libexec/helper" ''; preInstall = ''