Nixos-rebuild is compiling a non-existent package

I have not been able to nixos-rebuild my system. I removed celluloid from home.packages. But when I run nixos-rebuild it still tries to build celluloid. Celluloid has a dependency: deno. My laptop is old and it takes a very long time to compile deno. I do not attempt compiling. I’m on 25.11 stable release. But nixos-rebuild is fetching and building deno 2.6.10 (which is on unstable release) for some reason. I tried running this command:

nix why-depends .#nixosConfigurations.HOSTNAME.config.system.build.toplevel nixpkgs#deno

But it starts compiling deno from scratch again.

I want to remove celluloid and nixos-rebuild and be able to use my laptop. But I cannot nixos-rebuild or do anything. My nixos system have been behaving very strangely recently.

Here is my config for reference:

On update_flake_lock_action branch I removed celluloid, wrappers (not used) and sops-nix (a different problem).

1 Like

You are using release-25.11 in your flake for your nixpkgs.

Deno has been bumped on the release branch recently.

I presume that something else in your configuration must have a dependency on deno other than celluloid.

You will be getting a cache miss for deno as Hydra does not seem to have built it yet and hence you need to build it locally.

I recommend updating your nixpkgs input to nixos-25.11, if you do not have a particular reason to use release-25.11.

Thank you for your response! I didn’t know the difference between release-25.11 and nixos-25.11. Now, when I try to build with celluloid it doesn’t recompile!

1 Like

To find the source of a build time dependency without actually doing the build you need to pass --derivation to nix why-depends. Without it the package has to be built first to check if it’s in the eventual runtime closure.

2 Likes