Nixpkgs cache for musl binaries

I noticed there was pkgs.Musl to rebuild packages with musl (not static).
Does anyone maintain a Nix cache with prebuilt binaries for that?

I’m rebuilding the world apparently :slight_smile:

4 Likes

is there a way to rebuild my system with musl? that would be neat, i wouldn’t mind spending hours doing so, i’ve daily drien gentoo in the past…

i suppose something like:

  nixpkgs.config = {
    allowUnfree = true;
    localSystem = {
      system = "x86_64-linux";
      gcc.arch = "znver3";
      gcc.tune = "znver3";
    };
    pkgs = import pkgs.musl;
  };

however it didn’t seem to work…

1 Like

can you link me the docks or the source? would like to understand a bit more about this

I’d struggle to just give you the right answer to your original musl question, but note: nixpkgs.config declared in NixOS modules is the attrset passed on to (the lambda) (import <nixpkgs>) as the config argument; localSystem is not a nixpkgs config option, it’s another argument to (import <nixpkgs>); it’s import nixpkgs { config = { ... }; overlays = [ ... ]; localSystem = ...; }

2 Likes

you know, it doesn’t seem to be documented!

Here is the code where replaceStdenv gets called though: nixpkgs/pkgs/stdenv/custom/default.nix at 994692e08ef250029a191d294fbdc4664058bec0 · NixOS/nixpkgs · GitHub