Revert "stalwart-mail: build against system jemalloc"

authored by

eyjhb and committed by
Yureka
cf5377c6 bc215079

+3 -20
+3 -20
pkgs/by-name/st/stalwart-mail/package.nix
··· 9 9 sqlite, 10 10 foundationdb, 11 11 zstd, 12 - rust-jemalloc-sys-unprefixed, 13 12 stdenv, 14 13 nix-update-script, 15 14 nixosTests, ··· 19 18 stalwartEnterprise ? false, 20 19 }: 21 20 22 - let 23 - rocksdbJemalloc = rocksdb.override { enableJemalloc = true; }; 24 - in 25 21 rustPlatform.buildRustPackage (finalAttrs: { 26 22 pname = "stalwart-mail" + (lib.optionalString stalwartEnterprise "-enterprise"); 27 23 version = "0.12.2"; ··· 33 29 hash = "sha256-P19jeEzFE8Gu6hqHZJiPoJ70r+zOmzOpEwfFqPQczZY="; 34 30 }; 35 31 36 - # rocksdb does not properly distinguish between pointers it has allocated itself 37 - # and pointers which were passed in and might be registered with a different 38 - # allocator, so we enable the unprefixed_malloc_on_supported_platforms to use 39 - # jemalloc implicitly in the entire process. 40 - postPatch = '' 41 - for file in crates/main/Cargo.toml tests/Cargo.toml; do 42 - substituteInPlace $file --replace-fail \ 43 - 'jemallocator = "0.5.0"' 'jemallocator = { version = "0.5.0", features = ["unprefixed_malloc_on_supported_platforms"] }' 44 - done 45 - ''; 46 - 47 32 useFetchCargoVendor = true; 48 33 cargoHash = "sha256-WVvDapCA9pTgOtPpbsK78u2AC2hUfo3sOejZ6pJSlQk="; 49 34 ··· 58 43 openssl 59 44 sqlite 60 45 zstd 61 - rust-jemalloc-sys-unprefixed 62 - rocksdbJemalloc 63 46 ] ++ lib.optionals (stdenv.hostPlatform.isLinux && withFoundationdb) [ foundationdb ]; 64 47 65 48 # Issue: https://github.com/stalwartlabs/stalwart/issues/1104 ··· 80 63 env = { 81 64 OPENSSL_NO_VENDOR = true; 82 65 ZSTD_SYS_USE_PKG_CONFIG = true; 83 - ROCKSDB_INCLUDE_DIR = "${rocksdbJemalloc}/include"; 84 - ROCKSDB_LIB_DIR = "${rocksdbJemalloc}/lib"; 66 + ROCKSDB_INCLUDE_DIR = "${rocksdb}/include"; 67 + ROCKSDB_LIB_DIR = "${rocksdb}/lib"; 85 68 }; 86 69 87 70 postInstall = '' ··· 172 155 __darwinAllowLocalNetworking = true; 173 156 174 157 passthru = { 175 - rocksdb = rocksdbJemalloc; # make used rocksdb version available (e.g., for backup scripts) 158 + inherit rocksdb; # make used rocksdb version available (e.g., for backup scripts) 176 159 webadmin = callPackage ./webadmin.nix { }; 177 160 updateScript = nix-update-script { }; 178 161 tests.stalwart-mail = nixosTests.stalwart-mail;