nix-doc: fix build for Rust 1.79+

As of Rust 1.79+ (turned on in a5b2fe7374) `relro-level` is now stable. 🎉

This means `nix-doc` (which uses this option in its unstable form) needs to pass through `-C` instead of `-Z`.
This commit is contained in:
Philip Taron
2024-07-29 12:42:13 -07:00
parent bc95156d37
commit bb65f97e88
@@ -35,13 +35,11 @@ rustPlatform.buildRustPackage rec {
# the wrong Nix version (disabling bindnow permits loading libraries
# requiring unavailable symbols if they are unreached)
hardeningDisable = lib.optionals withPlugin [ "bindnow" ];
# Due to a Rust bug, setting -Z relro-level to anything including "off" on
# Due to a Rust bug, setting -C relro-level to anything including "off" on
# macOS will cause link errors
env = lib.optionalAttrs (withPlugin && stdenv.isLinux) {
# nix-doc does not use nightly features, however, there is no other way to
# set relro-level
RUSTC_BOOTSTRAP = 1;
RUSTFLAGS = "-Z relro-level=partial";
RUSTFLAGS = "-C relro-level=partial";
};
cargoHash = "sha256-CHagzXTG9AfrFd3WmHanQ+YddMgmVxSuB8vK98A1Mlw=";