overlays: consolidate Abseil BMI2 workaround under patches
treefmt / nix fmt (pull_request) Successful in 3s
pytest / pytest (pull_request) Successful in 1m1s
test ebook search / test-ebook-search (pull_request) Successful in 1m18s
build_systems / build-portal-1 (pull_request) Successful in 1h14m39s
build_systems / build-brain (pull_request) Successful in 1h39m5s
build_systems / build-jeeves (pull_request) Successful in 1h55m23s
build_systems / build-bob (pull_request) Successful in 3h55m16s
build_systems / build-rhapsody-in-green (pull_request) Failing after 12h0m1s
treefmt / nix fmt (pull_request) Successful in 3s
pytest / pytest (pull_request) Successful in 1m1s
test ebook search / test-ebook-search (pull_request) Successful in 1m18s
build_systems / build-portal-1 (pull_request) Successful in 1h14m39s
build_systems / build-brain (pull_request) Successful in 1h39m5s
build_systems / build-jeeves (pull_request) Successful in 1h55m23s
build_systems / build-bob (pull_request) Successful in 3h55m16s
build_systems / build-rhapsody-in-green (pull_request) Failing after 12h0m1s
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.
This commit is contained in:
@@ -1,22 +1,6 @@
|
||||
# Compatibility fixes for packages rebuilt with x86-64-v3.
|
||||
#
|
||||
# The v3 baseline enables instructions that expose source assumptions hidden
|
||||
# by the generic x86-64 build. Keep compile fixes here, separate from test
|
||||
# exclusions, until upstream or nixpkgs incorporates them.
|
||||
# Output-validation workarounds for packages rebuilt with x86-64-v3.
|
||||
_final: prev:
|
||||
let
|
||||
patchAbseilBmi2Include =
|
||||
package:
|
||||
package.overrideAttrs (old: {
|
||||
# GCC and Clang prohibit including their internal BMI2 header directly.
|
||||
# The public umbrella provides the same intrinsics with the required
|
||||
# compiler setup.
|
||||
postPatch = (old.postPatch or "") + ''
|
||||
substituteInPlace third_party/abseil-cpp/absl/container/internal/raw_hash_set.h \
|
||||
--replace-fail "#include <bmi2intrin.h>" "#include <immintrin.h>"
|
||||
'';
|
||||
});
|
||||
|
||||
removeSiblingOutputChecks =
|
||||
package:
|
||||
package.overrideAttrs (old: {
|
||||
@@ -29,32 +13,8 @@ let
|
||||
) (old.outputChecks or { });
|
||||
});
|
||||
|
||||
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;
|
||||
|
||||
postgresql = removeSiblingOutputChecks prev.postgresql;
|
||||
postgresql_18 = removeSiblingOutputChecks prev.postgresql_18;
|
||||
|
||||
signal-desktop = prev.signal-desktop.override {
|
||||
electron_43 = electron43;
|
||||
callPackage = signalCallPackage;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user