Rust-docs error: do not know how to unpack source archive

im trying to update my system and having the following errors.

error: Cannot build '/nix/store/s795jlqvg4fhf6sgkld6zbk7zx8fwgz4-rust-docs-1.89.0-x86_64-unknown-linux-gnu.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/sxhgmswbqc7zx9681s0qsajv7xkjk9rf-rust-docs-1.89.0-x86_64-unknown-linux-gnu
       Last 3 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/yj43bcxlhhd2vl11ch0n59zxxw1xy20f-unknown
       > do not know how to unpack source archive /nix/store/yj43bcxlhhd2vl11ch0n59zxxw1xy20f-unknown
       For full logs, run:
         nix log /nix/store/s795jlqvg4fhf6sgkld6zbk7zx8fwgz4-rust-docs-1.89.0-x86_64-unknown-linux-gnu.drv
❯ nix log /nix/store/s795jlqvg4fhf6sgkld6zbk7zx8fwgz4-rust-docs-1.89.0-x86_64-unknown-linux-gnu.drv
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/yj43bcxlhhd2vl11ch0n59zxxw1xy20f-unknown
do not know how to unpack source archive /nix/store/yj43bcxlhhd2vl11ch0n59zxxw1xy20f-unknown

I also am getting some evaluation warning on system but cant seen to locate which file raises this problem:

evaluation warning: 'system' has been renamed to/replaced by 'stdenv.hostPlatform.system'

This might be the reason because its saying unknown on the derivation of the error

Anyone have the same error? or some idea how to fix/debug this?

[UPDATE] I figured out the problem

It had no relation to that evaluation warning about system, after this evaluation was fixed i was still not able to update.

The reason for the error comes from swww package that i was using, it was archived and moved to codeberg with a different name: awww.

After updating the flake inputs with the new url and renaming swww to awww everywhere on my config, everything seems to be able to build alright again.

1 Like

Hey! How did you manage to get rid of the warning? I’m getting the same, but because it has no info about the file and my config is pretty modular, I’m not sure which of all the “systems” is the offending one (system.stateVersion? nixpkgs.lib.nixosSystem { inherit system } ? I tried both without success :frowning:

Hi!

Try searching through all configuration files where pkgs.system might be used.
Here’s how I do it myself:

grep -r "\bpkgs\.system\b" ~/.setup  # replace setup with your configuration directory

I had it in a couple of places myself:

/home/stepan/.setup/hosts/_shared/boot/loader.nix:  theme = inputs.distro-grub-themes.packages.${pkgs.system}."${cfg.grubTheme}-grub-theme";

Accordingly, it needs to be replaced with pkgs.stdenv.hostPlatform.system.

1 Like

That helped a lot!

For the record, I was using it inside a

with pkgs; [ inputs.my-input.packages."${system}".default ]

block.