Building cuda seems to freeze

When I run home-manager switch --flake it freezes when it gets to this:

building    Dload  Upload  Total  Spent  Left  Speed

It sits there, not updating the screen, and never finishing. I am able to ^C out of it.

Update: the command actually completed after 36 mins. That’s weird. Why did it take so long?

Also, what is cuda? It seems to be related to NVidia GPUs. I don’t have an NVidia GPU. What would be causing this to be installed? How can I check this?

I just did a quick web search… Files with similar names seem to be 3GiB or larger. So depending on your connection speed and the connectivity of the host you download from, 30 minutes seem plausible…

(3 GiB in 30 minutes would be equivalent to a saturated 50 Mbit/s connection)

It took 36 mins after downloading.

The line you pasted indicates an ongoing download within a fixed output derivation.

Cuda won’t be substituted because of its license.


How can I find out which package is pulling in cuda as a dependency? I would love to be able to remove that package if I can, because it takes 30-45 min to build cuda everytime there is an update.

You can use nix path-info -r /run/current-system/sw | grep cuda to find out which exact path is pulled in, then use nix why-depends /run/current-system/sw /nix/store/$hash-$thatCudePath to get a clue what might pull it in.

Hmm… grepping cuda yields no results. Is it because it is not explicitly installed? Because it is a dependency?

In this case you might want to try grepping for nvidia or try to use --derivation with the path-info and `why-depends.while grepping for either.

If that doesn’t help, perhaps send over the flake, then we can try to see if we see something.

Hosted by Flying Circus.