python313Packages.granian: use jemalloc hook to fix aarch64-linux

This commit is contained in:
Sandro Jäckel
2025-05-27 03:08:01 +02:00
committed by Peder Bergebakken Sundt
parent 90d72a1d8c
commit f3752be2ff
@@ -13,6 +13,7 @@
pytest-asyncio,
websockets,
httpx,
rust-jemalloc-sys,
sniffio,
nix-update-script,
}:
@@ -39,6 +40,21 @@ buildPythonPackage rec {
maturinBuildHook
];
buildInputs = [
# fix "Unsupported system page size" on aarch64-linux with 16k pages
# https://github.com/NixOS/nixpkgs/issues/410572
(rust-jemalloc-sys.overrideAttrs (
{ configureFlags, ... }:
{
configureFlags = configureFlags ++ [
# otherwise import check fails with:
# ImportError: {{storeDir}}/lib/libjemalloc.so.2: cannot allocate memory in static TLS block
"--disable-initial-exec-tls"
];
}
))
];
dependencies = [
click
];