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.

2 Likes

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.

3 Likes

That helped a lot!

For the record, I was using it inside a

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

block.

Hey sorry for the late reply, but yeah just as MOIS3Y said.

For me it was even harder to find btw, i was importing another flake of mine (for neovim) that had the problems, most of the errors was from outside my repo and i had no idea haha.

Well at least its fixed, only the system problem tho, as for rust-docs, there is something more that i gotta do that im still figuring it out. For now i downgraded my Yazi and Hyperland to use the packages from nixpkgs instead of their respective flakes.

For yazi i opened an issue here: Build error on flake: do not know how to unpack source archive ยท Issue #3312 ยท sxyazi/yazi ยท GitHub

[update]
as the issue has been marked as closed, i believe its fixed, havent tried yet, will update when i do.

i didnt have sww installed and also i dont have yazi but the problem still exist

winbox>
copying path '/nix/store/qx3jha98mp01mmhgakxcxqdwccrmgp8k-flite-2.2-lib' from 'https://cache.nixos.org'
systemd-user.pam> building '/nix/store/40d1mijxjlarpk94ihs6nvk431cq43in-systemd-user.pam.drv'
systemd> building '/nix/store/ihq2rvaasmfgw7r8gwjz5spddwb7wnj6-systemd.drv'
tpm2-udev-trigger.sh> building '/nix/store/87s45f0jb85p26fiffmqj037ynbhbhfg-tpm2-udev-trigger.sh.drv'
udev-path> building '/nix/store/9nhafbbg3l6w04l6g2g0fy8g5nj00ipk-udev-path.drv'
error: Cannot build '/nix/store/ngy927a88n70hm9d1fh933chg933g71l-rust-docs-1.78.0-x86_64-unknown-linux-gnu.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/4zcv6y2k2ddxl7lsy9ag31150rbxkjf4-rust-docs-1.78.0-x86_64-unknown-linux-gnu
       Last 3 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/bnk4xdgfiw8ixp0ip26mir6dq7ynnik4-unknown
       > do not know how to unpack source archive /nix/store/bnk4xdgfiw8ixp0ip26mir6dq7ynnik4-unknown
       For full logs, run:
         nix log /nix/store/ngy927a88n70hm9d1fh933chg933g71l-rust-docs-1.78.0-x86_64-unknown-linux-gnu.drv
error: Cannot build '/nix/store/jvaa1ch3j3vzl6fnjhp9370rn9xalni1-rust-default-1.78.0.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/37dwsbx2n3hhl3gzfgp48zyl9qjhhf28-rust-default-1.78.0
error: Cannot build '/nix/store/jw2vdniy31z9kasq5yc3h4kjljp7jdh0-lanzaboote-stub-0.4.2.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/3jh0y0g82ysijvqmy0vf6cy3qwc4203q-lanzaboote-stub-0.4.2
error: Cannot build '/nix/store/lvfhrzsjvwpwnmli9ww9zmprxglxl7rx-lzbt.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/pb8wjm0p9vlh7kf3ldyy1qkd5a0q0xc4-lzbt
error: Cannot build '/nix/store/cpxjy9sbch98gm6jqwj2vn48gn50y1z8-bootinstall.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/6f3p6addszqnkv0n9hz5410d7pzf3xvi-bootinstall
โ”โ” 5 Errors:
 โ‹ฎ
โ”ƒ โ”‚  โ”‚  โ”‚        โ”Œโ”€ โธ ghostty-1.3.0-dev
โ”ƒ โ”‚  โ”‚  โ”‚        โ”œโ”€ โต dmsCli-0.6.2+date=2025-11-20_12e9153 (buildPhase) โฑ 20s
โ”ƒ โ”‚  โ”‚  โ”‚        โ”œโ”€ โต dgop-0.1.11 (buildPhase) โฑ 20s
โ”ƒ โ”‚  โ”‚  โ”‚     โ”Œโ”€ โธ home-manager-path
โ”ƒ โ”‚  โ”‚  โ”‚  โ”Œโ”€ โธ home-manager-generation
โ”ƒ โ”‚  โ”‚  โ”œโ”€ โธ unit-home-manager-fathirbimashabri.service
โ”ƒ โ”‚  โ”‚  โ”‚                       โ”Œโ”€ โต source โฑ 20s
โ”ƒ โ”‚  โ”‚  โ”‚                    โ”Œโ”€ โธ linux-6.17.8
โ”ƒ โ”‚  โ”‚  โ”‚                 โ”Œโ”€ โ†“ โธ nvidia-x11-580.105.08-6.17.8
โ”ƒ โ”‚  โ”‚  โ”‚                 โ”œโ”€ โต vista-fonts-1 (unpackPhase) โฑ 20s
โ”ƒ โ”‚  โ”‚  โ”‚              โ”Œโ”€ โธ steam-run-fhsenv-rootfs
โ”ƒ โ”‚  โ”‚  โ”‚           โ”Œโ”€ โธ steam-run-bwrap
โ”ƒ โ”‚  โ”‚  โ”‚        โ”Œโ”€ โธ steam-run
โ”ƒ โ”‚  โ”‚  โ”‚        โ”‚  โ”Œโ”€ โต postman-11.70.6.tar.gz โฑ 20s
โ”ƒ โ”‚  โ”‚  โ”‚        โ”œโ”€ โธ postman-11.70.6
โ”ƒ โ”‚  โ”‚  โ”‚        โ”‚  โ”Œโ”€ โต mongodb-compass_1.48.1_amd64.deb โฑ 20s
โ”ƒ โ”‚  โ”‚  โ”‚        โ”œโ”€ โธ mongodb-compass-1.48.1
โ”ƒ โ”‚  โ”‚  โ”‚        โ”‚  โ”Œโ”€ โต VMware-Workstation-Full-17.6.4-24832109.x86_64.bundle โฑ 20s
โ”ƒ โ”‚  โ”‚  โ”‚        โ”œโ”€ โธ vmware-workstation-17.6.4
โ”ƒ โ”‚  โ”‚  โ”‚        โ”œโ”€ โต nixos-generate-config โฑ 16s
โ”ƒ โ”‚  โ”‚  โ”‚        โ”œโ”€ โต ld-library-path โฑ 16s
โ”ƒ โ”‚  โ”‚  โ”‚        โ”œโ”€ โต winbox-4.0beta41 (fixupPhase) โฑ 21s
โ”ƒ โ”‚  โ”‚  โ”‚     โ”Œโ”€ โธ system-path
โ”ƒ โ”‚  โ”‚  โ”‚  โ”Œโ”€ โธ X-Restart-Triggers-polkit
โ”ƒ โ”‚  โ”‚  โ”œโ”€ โธ unit-polkit.service
โ”ƒ โ”‚  โ”œโ”€ โธ system-units
โ”ƒ โ”‚  โ”œโ”€ โต systemd-user.pam โฑ 16s
โ”ƒ โ”œโ”€ โธ etc
โ”ƒ โธ nixos-system-nixos-25.11.20251117.89c2b23
โ”ฃโ”โ”โ” Builds             โ”‚ Downloads
โ”—โ” โˆ‘ โต 19 โ”‚ โœ” 8 โ”‚ โธ 247 โ”‚ โ†“ 0 โ”‚ โ†“ 0 โ”‚ โธ 494 โ”‚ โฑ 1m34s^C

also

 file /nix/store/bnk4xdgfiw8ixp0ip26mir6dq7ynnik4-unknown
ls -lh /nix/store/bnk4xdgfiw8ixp0ip26mir6dq7ynnik4-unknown
/nix/store/bnk4xdgfiw8ixp0ip26mir6dq7ynnik4-unknown: xz compressed data
-r--r--r-- 2 root root 16M Jan  1  1970 /nix/store/bnk4xdgfiw8ixp0ip26mir6dq7ynnik4-unknown
 nix log /nix/store/ngy927a88n70hm9d1fh933chg933g71l-rust-docs-1.78.0-x86_64-unknown-linux-gnu.drv

Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/bnk4xdgfiw8ixp0ip26mir6dq7ynnik4-unknown
do not know how to unpack source archive /nix/store/bnk4xdgfiw8ixp0ip26mir6dq7ynnik4-unknown

Your logs tell you whatโ€™s indirectly pulling it in (lanzaboote). Report it to them.

1 Like

Had the same error. Also using the lanzaboote flake. Turns out you need to update it: Release v0.4.3 ยท nix-community/lanzaboote ยท GitHub

This solved the problem for me.

1 Like

yup that resolved it