Extract the header fix into a standalone patch and colocate the Electron, Deno, and Signal overrides in patches/abseil. Preserve the x86-64-v3 restriction and document the accepted upstream fix while waiting for bundled dependency updates. Import the Abseil overrides through the patches overlay and register the torchcodec override. Leave PostgreSQL output checks in x86-64-v3-workarounds.nix.
39 lines
1.2 KiB
Nix
39 lines
1.2 KiB
Nix
# Abseil accepted the upstream fix: https://github.com/abseil/abseil-cpp/pull/2071
|
|
# Keep this workaround until Electron, Deno's rusty_v8, and Signal's WebRTC
|
|
# update their bundled Abseil copies to include it.
|
|
{ prev }:
|
|
let
|
|
patchAbseilBmi2Include =
|
|
package:
|
|
package.overrideAttrs (old: {
|
|
# GCC and Clang require the public umbrella header for BMI2 intrinsics.
|
|
patches = (old.patches or [ ]) ++ [ ./bmi2-public-header.patch ];
|
|
});
|
|
|
|
electron43Unwrapped = patchAbseilBmi2Include prev.electron_43.unwrapped;
|
|
electron43 = prev.electron_43.override {
|
|
electron-unwrapped = electron43Unwrapped;
|
|
};
|
|
|
|
signalCallPackage =
|
|
path: args:
|
|
let
|
|
package = prev.callPackage path args;
|
|
in
|
|
if builtins.baseNameOf path == "webrtc.nix" then patchAbseilBmi2Include package else package;
|
|
in
|
|
prev.lib.optionalAttrs ((prev.stdenv.hostPlatform.gcc.arch or null) == "x86-64-v3") {
|
|
deno =
|
|
let
|
|
librusty_v8 = patchAbseilBmi2Include prev.deno.passthru.librusty_v8;
|
|
in
|
|
prev.deno.override { inherit librusty_v8; };
|
|
|
|
electron_43 = electron43;
|
|
|
|
signal-desktop = prev.signal-desktop.override {
|
|
electron_43 = electron43;
|
|
callPackage = signalCallPackage;
|
|
};
|
|
}
|