I recently installed nixOs. Yesterday I installed zed-editor from unstable branch, and it successfully downloaded it, and it worked nicely. Today I ran nixos-rebuild and now it tries to build it from source. This process halts btw, which I have no idea is why (possibly because of “only” 8 gb of ram). Why was it cached yesterday and not today? Am I doing something wrong?
Sometimes hydra fails to build a package because the package is broken (spurious failures happen very rarely as well), which then means that it will no longer be available from the cache, and your nix will try (and often fail) to build it locally.
Without sharing the error message I can’t really tell you why it’s failing to build locally.
That said, zed
seems to be successfully building on unstable & stable at the moment:
tlater ~ $ hydra-check zed
Build Status for nixpkgs.zed.x86_64-linux on unstable
✔ zed-1.18.0 from 2025-02-07 - https://hydra.nixos.org/build/287814639
tlater ~ $ hydra-check --channel 24.11 zed
Build Status for nixpkgs.zed.x86_64-linux on 24.11
✔ zed-1.18.0 from 2025-01-26 - https://hydra.nixos.org/build/286542712
So this is likely not one of the cases where the package fails to build upstream. You’re either using a weird channel that isn’t supposed to be used if you want to use the cache since it doesn’t wait for hydra (e.g. release-24.11
, or perhaps abusing fetchurl
without a hash to download nixpkgs master), or you’re doing some override that changes the package and breaks it.
I think my inputs are wrong. Also when I do nix-channel --list
I get nothing.
flake.nix
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
# home-manager, used for managing user configuration
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
# The `follows` keyword in inputs is used for inheritance.
# Here, `inputs.nixpkgs` of home-manager is kept consistent with
# the `inputs.nixpkgs` of the current flake,
# to avoid problems caused by different versions of nixpkgs.
inputs.nixpkgs.follows = "nixpkgs";
};
};
Also, if that matters, I’m trying to install it from home manager.
Hydra job failed with “No space left on device”, so you did nothing wrong:
https://hydra.nixos.org/build/290050633
Zed requires quite a lot of resources (CPU / RAM) to build nowadays, and takes about half an hour on good hardware.
The builders are affected by a bug that leaves the build root of aborted builds in /tmp, which eventually runs too full for large builds.
We could reproduce this behaviour both with nix 2.24 as well with nix 2.92.
I restarted the build, so it should be cached in a few hours.
Whelp, and here I thought I can trust the helpful CLI tool so I don’t need to remember how to browse hydra.
Sorry for misleading you @xrtxn !
No worries, thanks for everyone helping me understand this