diff --git a/pkgs/applications/blockchains/lighthouse/default.nix b/pkgs/applications/blockchains/lighthouse/default.nix index 20792dd8fd95..44cbb147bd20 100644 --- a/pkgs/applications/blockchains/lighthouse/default.nix +++ b/pkgs/applications/blockchains/lighthouse/default.nix @@ -14,6 +14,7 @@ , rustPlatform , Security , sqlite +, rust-jemalloc-sys , stdenv , SystemConfiguration , testers @@ -70,6 +71,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ sqlite + rust-jemalloc-sys ] ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security diff --git a/pkgs/applications/blockchains/polkadot/default.nix b/pkgs/applications/blockchains/polkadot/default.nix index 1ed5d9819110..4be874ef5ce1 100644 --- a/pkgs/applications/blockchains/polkadot/default.nix +++ b/pkgs/applications/blockchains/polkadot/default.nix @@ -2,6 +2,7 @@ , lib , protobuf , rocksdb +, rust-jemalloc-sys-unprefixed , rustPlatform , rustc-wasm32 , stdenv @@ -60,7 +61,9 @@ rustPlatform.buildRustPackage rec { rustc-wasm32.llvmPackages.lld ]; - buildInputs = lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; + buildInputs = [ + rust-jemalloc-sys-unprefixed + ] ++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; # NOTE: we need to force lld otherwise rust-lld is not found for wasm32 target CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "lld"; diff --git a/pkgs/applications/office/activitywatch/default.nix b/pkgs/applications/office/activitywatch/default.nix index 04d58e74dadd..4187da1bfabb 100644 --- a/pkgs/applications/office/activitywatch/default.nix +++ b/pkgs/applications/office/activitywatch/default.nix @@ -5,6 +5,7 @@ , pkg-config , perl , openssl +, rust-jemalloc-sys , python3 , wrapQtAppsHook , qtbase @@ -173,6 +174,7 @@ rec { buildInputs = [ openssl + rust-jemalloc-sys ]; postFixup = '' diff --git a/pkgs/development/python-modules/polars/default.nix b/pkgs/development/python-modules/polars/default.nix index b070ae37978f..ccd6f2b79ba9 100644 --- a/pkgs/development/python-modules/polars/default.nix +++ b/pkgs/development/python-modules/polars/default.nix @@ -6,6 +6,7 @@ , libiconv , fetchFromGitHub , typing-extensions +, rust-jemalloc-sys , darwin }: let @@ -49,7 +50,9 @@ buildPythonPackage { nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = [ + rust-jemalloc-sys + ] ++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/development/tools/ruff/default.nix b/pkgs/development/tools/ruff/default.nix index b7c5ab87a644..8b42bfbe85c5 100644 --- a/pkgs/development/tools/ruff/default.nix +++ b/pkgs/development/tools/ruff/default.nix @@ -4,6 +4,7 @@ , installShellFiles , stdenv , darwin +, rust-jemalloc-sys # tests , ruff-lsp }: @@ -31,19 +32,15 @@ rustPlatform.buildRustPackage rec { installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ + buildInputs = [ + rust-jemalloc-sys + ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; cargoBuildFlags = [ "--package=ruff_cli" ]; cargoTestFlags = cargoBuildFlags; - preBuild = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) '' - # See https://github.com/jemalloc/jemalloc/issues/1997 - # Using a value of 48 should work on both emulated and native x86_64-darwin. - export JEMALLOC_SYS_WITH_LG_VADDR=48 - ''; - # tests expect no colors preCheck = '' export NO_COLOR=1 diff --git a/pkgs/servers/kanidm/default.nix b/pkgs/servers/kanidm/default.nix index e6c49b846f4b..65450e0e3eb9 100644 --- a/pkgs/servers/kanidm/default.nix +++ b/pkgs/servers/kanidm/default.nix @@ -11,6 +11,7 @@ , sqlite , pam , bashInteractive +, rust-jemalloc-sys }: let @@ -59,6 +60,7 @@ rustPlatform.buildRustPackage rec { openssl sqlite pam + rust-jemalloc-sys ]; # The UI needs to be in place before the tests are run. diff --git a/pkgs/servers/matrix-conduit/default.nix b/pkgs/servers/matrix-conduit/default.nix index 6cb8f16d203c..cc162e6373d6 100644 --- a/pkgs/servers/matrix-conduit/default.nix +++ b/pkgs/servers/matrix-conduit/default.nix @@ -7,6 +7,7 @@ , darwin , nixosTests , rocksdb +, rust-jemalloc-sys }: rustPlatform.buildRustPackage rec { @@ -42,7 +43,10 @@ rustPlatform.buildRustPackage rec { pkg-config ]; - buildInputs = [ sqlite ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ + sqlite + rust-jemalloc-sys + ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; diff --git a/pkgs/servers/search/qdrant/default.nix b/pkgs/servers/search/qdrant/default.nix index 005514819820..6d70b5e4b3da 100644 --- a/pkgs/servers/search/qdrant/default.nix +++ b/pkgs/servers/search/qdrant/default.nix @@ -5,6 +5,7 @@ , stdenv , pkg-config , openssl +, rust-jemalloc-sys , nix-update-script , Security }: @@ -32,7 +33,10 @@ rustPlatform.buildRustPackage rec { # Needed to get openssl-sys to use pkg-config. OPENSSL_NO_VENDOR = 1; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ + openssl + rust-jemalloc-sys + ] ++ lib.optionals stdenv.isDarwin [ Security ]; nativeBuildInputs = [ protobuf rustPlatform.bindgenHook pkg-config ]; diff --git a/pkgs/servers/search/quickwit/default.nix b/pkgs/servers/search/quickwit/default.nix index 9fdcbef3e712..f4d75be434ec 100644 --- a/pkgs/servers/search/quickwit/default.nix +++ b/pkgs/servers/search/quickwit/default.nix @@ -4,6 +4,7 @@ , rustPlatform , nix-update-script , protobuf +, rust-jemalloc-sys , Security }: @@ -32,7 +33,9 @@ rustPlatform.buildRustPackage rec { sourceRoot = "${src.name}/quickwit"; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ + rust-jemalloc-sys + ] ++ lib.optionals stdenv.isDarwin [ Security ]; cargoLock = { lockFile = ./Cargo.lock; diff --git a/pkgs/tools/misc/fd/default.nix b/pkgs/tools/misc/fd/default.nix index 0f78b752de00..23e00e00363c 100644 --- a/pkgs/tools/misc/fd/default.nix +++ b/pkgs/tools/misc/fd/default.nix @@ -1,4 +1,4 @@ -{ lib, rustPlatform, fetchFromGitHub, installShellFiles, testers, fd }: +{ lib, rustPlatform, fetchFromGitHub, installShellFiles, rust-jemalloc-sys, testers, fd }: rustPlatform.buildRustPackage rec { pname = "fd"; @@ -15,6 +15,8 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; + buildInputs = [ rust-jemalloc-sys ]; + # skip flaky test checkFlags = [ "--skip=test_owner_current_group" diff --git a/pkgs/tools/misc/turbo/default.nix b/pkgs/tools/misc/turbo/default.nix index f3fcd8cd0f30..c887fdc131c2 100644 --- a/pkgs/tools/misc/turbo/default.nix +++ b/pkgs/tools/misc/turbo/default.nix @@ -12,6 +12,7 @@ , openssl , extra-cmake-modules , fontconfig +, rust-jemalloc-sys , testers , turbo , nix-update-script @@ -149,6 +150,7 @@ rustPlatform.buildRustPackage { buildInputs = [ openssl fontconfig + rust-jemalloc-sys ] ++ lib.optionals stdenv.isDarwin [ IOKit CoreServices diff --git a/pkgs/tools/misc/vector/default.nix b/pkgs/tools/misc/vector/default.nix index b1fd29e74673..c50d136d051e 100644 --- a/pkgs/tools/misc/vector/default.nix +++ b/pkgs/tools/misc/vector/default.nix @@ -8,6 +8,7 @@ , rdkafka , oniguruma , zstd +, rust-jemalloc-sys , Security , libiconv , coreutils @@ -59,7 +60,7 @@ rustPlatform.buildRustPackage { }; }; nativeBuildInputs = [ pkg-config cmake perl git rustPlatform.bindgenHook ]; - buildInputs = [ oniguruma openssl protobuf rdkafka zstd ] + buildInputs = [ oniguruma openssl protobuf rdkafka zstd rust-jemalloc-sys ] ++ lib.optionals stdenv.isDarwin [ Security libiconv coreutils CoreServices ]; # needed for internal protobuf c wrapper library