[Nix-dev] ghcWithPackages appears broken in nixpkgs HEAD?

Peter Simons simons at cryp.to
Wed Mar 25 14:31:32 CET 2015


Hi Christian,

 > I have the same problem and tried what you mentioned. It alas doesn't
 > work:
 >
 >   > sudo nix-store --delete /nix/store/*-ghc-7.8.4
 >   finding garbage collector roots...
 >   error: cannot delete path ‘/nix/store/rnxk1a1bz4rgy1rw4973blbfp9f0ic89-ghc-7.8.4’ since it is still alive
 >   0 store paths deleted, 0.00 MiB freed

a path is "alive" if it's reachable from any garbage collection root.
Apparently you have some package installed in the system profile or any
of the user profiles that depends (directly or indirectly) on GHC. If
you do, those packages must be removed from the profile before GHC can
be garbage collected.

You can always give the switch "--ignore-liveness" to force garbage
collection of GHC, but note that any profile that depends on GHC will
disappear in the process -- so you may potentially end up without a
system profile when that command returns. It's probably unwise to risk
that. Anyway, the flag exists ... use it at your own discretion. :-)

Best regards,
Peter



More information about the nix-dev mailing list