diff --git a/pkgs/development/python-modules/granian/default.nix b/pkgs/development/python-modules/granian/default.nix index 739d4cbab3f2..8a75a70eaa59 100644 --- a/pkgs/development/python-modules/granian/default.nix +++ b/pkgs/development/python-modules/granian/default.nix @@ -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 ];