Building `openblas` with `DEBUG=1` only for `open-webui`


I’m currently facing an issue with openblas in open-webui. I opened an issue upstream and one of the maintainers suggested me to build openblas with DEBUG=1 make flags.

I’m opening this issue to get some help on the best way to do this, and I have 2 questions.

  1. What would be the best way to do that in Nixpkgs ?
  2. I would like to keep the amount of rebuilds very low. To illustrate this, I wish I would strictly rebuild the openblas version from the dependency tree of open-webui only.

What I tried so far:

  1. Create a custom overlay containing a modified version of openblas… but this doesn’t seem work.
  2. In the flake containing the configuration of the server running open-webui, I replaced all the occurrences of nixpkgs inputs with a local version, then modified the open-webui derivation and added the DEBUG=1 flag… while this seems to work, it is rebuilding quite a lot of things and I gave up.

Thanks in advance for all your insights.

You could probly use system.replaceRuntimeDependencies to replace the lib at runtime so that you don’t need to recompile all the packages that depend on openblas.

Do you have an example of this? Never used or seen that yet in 3 years!

Here is an example usage from nixos-hardware.

Don’t have accesse to my pc at the moment to give a better example.

1 Like


It is now failing at:

Context: python311Packages.jaxlib: fix bazel hash by GaetanLepage · Pull Request #321559 · NixOS/nixpkgs · GitHub

Do you know how I could fix locally that hash mismatch issue, so I can move on with my real initial issue?

I regular cases i would do an override, but as this hash is in a let statement i would probably download that nix file an modify it locally and then do a callPackage in config.packageOverrides (where you import nixpkgs) for it.