python313Packages.granian: use jemalloc hook to fix aarch64-linux (#410611)

This commit is contained in:
Arne Keller
2025-06-02 08:46:15 +02:00
committed by GitHub
@@ -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
];