mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
Without setting JEMALLOC_OVERRIDE, we end up linking to two different jemalloc builds. Once dynamically, as a transitive dependency through rocksdb, and a second time to the static jemalloc that tikv-jemalloc-sys builds. This fixes dynamically-linked jemalloc builds, for the reasons described in <https://github.com/girlbossceo/conduwuit/pull/400#issue-2316700200>.
38 lines
844 B
Nix
38 lines
844 B
Nix
# Keep sorted
|
|
{ default
|
|
, engage
|
|
, inputs
|
|
, jq
|
|
, mkShell
|
|
, system
|
|
, toolchain
|
|
}:
|
|
|
|
mkShell {
|
|
env = default.env // {
|
|
# Rust Analyzer needs to be able to find the path to default crate
|
|
# sources, and it can read this environment variable to do so. The
|
|
# `rust-src` component is required in order for this to work.
|
|
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
|
|
};
|
|
|
|
# Development tools
|
|
nativeBuildInputs = [
|
|
# Always use nightly rustfmt because most of its options are unstable
|
|
#
|
|
# This needs to come before `toolchain` in this list, otherwise
|
|
# `$PATH` will have stable rustfmt instead.
|
|
inputs.fenix.packages.${system}.latest.rustfmt
|
|
|
|
# Keep sorted
|
|
engage
|
|
jq
|
|
toolchain
|
|
]
|
|
++
|
|
default.nativeBuildInputs
|
|
++
|
|
default.propagatedBuildInputs
|
|
++
|
|
default.buildInputs;
|
|
}
|