tree-wide: make rust jemalloc-sys use nixpkgs jemalloc build
This commit is contained in:
parent
35925e55f2
commit
799fff889b
12 changed files with 39 additions and 14 deletions
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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 = ''
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
||||
|
|
|
@ -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 ];
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue