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 sqlite, 10 foundationdb, 11 zstd, 12 - rust-jemalloc-sys-unprefixed, 13 stdenv, 14 nix-update-script, 15 nixosTests, ··· 19 stalwartEnterprise ? false, 20 }: 21 22 - let 23 - rocksdbJemalloc = rocksdb.override { enableJemalloc = true; }; 24 - in 25 rustPlatform.buildRustPackage (finalAttrs: { 26 pname = "stalwart-mail" + (lib.optionalString stalwartEnterprise "-enterprise"); 27 version = "0.12.2"; ··· 33 hash = "sha256-P19jeEzFE8Gu6hqHZJiPoJ70r+zOmzOpEwfFqPQczZY="; 34 }; 35 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 useFetchCargoVendor = true; 48 cargoHash = "sha256-WVvDapCA9pTgOtPpbsK78u2AC2hUfo3sOejZ6pJSlQk="; 49 ··· 58 openssl 59 sqlite 60 zstd 61 - rust-jemalloc-sys-unprefixed 62 - rocksdbJemalloc 63 ] ++ lib.optionals (stdenv.hostPlatform.isLinux && withFoundationdb) [ foundationdb ]; 64 65 # Issue: https://github.com/stalwartlabs/stalwart/issues/1104 ··· 80 env = { 81 OPENSSL_NO_VENDOR = true; 82 ZSTD_SYS_USE_PKG_CONFIG = true; 83 - ROCKSDB_INCLUDE_DIR = "${rocksdbJemalloc}/include"; 84 - ROCKSDB_LIB_DIR = "${rocksdbJemalloc}/lib"; 85 }; 86 87 postInstall = '' ··· 172 __darwinAllowLocalNetworking = true; 173 174 passthru = { 175 - rocksdb = rocksdbJemalloc; # make used rocksdb version available (e.g., for backup scripts) 176 webadmin = callPackage ./webadmin.nix { }; 177 updateScript = nix-update-script { }; 178 tests.stalwart-mail = nixosTests.stalwart-mail;
··· 9 sqlite, 10 foundationdb, 11 zstd, 12 stdenv, 13 nix-update-script, 14 nixosTests, ··· 18 stalwartEnterprise ? false, 19 }: 20 21 rustPlatform.buildRustPackage (finalAttrs: { 22 pname = "stalwart-mail" + (lib.optionalString stalwartEnterprise "-enterprise"); 23 version = "0.12.2"; ··· 29 hash = "sha256-P19jeEzFE8Gu6hqHZJiPoJ70r+zOmzOpEwfFqPQczZY="; 30 }; 31 32 useFetchCargoVendor = true; 33 cargoHash = "sha256-WVvDapCA9pTgOtPpbsK78u2AC2hUfo3sOejZ6pJSlQk="; 34 ··· 43 openssl 44 sqlite 45 zstd 46 ] ++ lib.optionals (stdenv.hostPlatform.isLinux && withFoundationdb) [ foundationdb ]; 47 48 # Issue: https://github.com/stalwartlabs/stalwart/issues/1104 ··· 63 env = { 64 OPENSSL_NO_VENDOR = true; 65 ZSTD_SYS_USE_PKG_CONFIG = true; 66 + ROCKSDB_INCLUDE_DIR = "${rocksdb}/include"; 67 + ROCKSDB_LIB_DIR = "${rocksdb}/lib"; 68 }; 69 70 postInstall = '' ··· 155 __darwinAllowLocalNetworking = true; 156 157 passthru = { 158 + inherit rocksdb; # make used rocksdb version available (e.g., for backup scripts) 159 webadmin = callPackage ./webadmin.nix { }; 160 updateScript = nix-update-script { }; 161 tests.stalwart-mail = nixosTests.stalwart-mail;