raco setup --fix-pkg-deps needs --avoid-main on NixOS

19 views
Skip to first unread message

unlimitedscolobb

unread,
May 16, 2020, 12:53:54 PM5/16/20
to Racket Users
Hi Racket+NixOS-heads out there,

I was trying to use `raco setup --fix-pkg-deps` to get the dependencies of my package automatically fixed, but it would fail with a lot of "cannot delete file" errors.  That's because `raco setup --fix-pkg-deps` looks at all packages, including the system-wide ones, which are immutable on NixOS (or under Nix, more generally).

It is actually easy to prevent `raco setup` from messing with the immutable parts of the installation by running it with the additional flag `--avoid-main`, like this:

  `$ raco setup --fix-pkg-deps --avoid-main`

Easy when you know where to look :-)

On a side note, I am a little bit surprised that `raco setup --fix-pkg-deps` does nothing to user-specific packages when it fails on the system-wide ones.  I'd expect it to fail gracefully and operate on those sets of packages to which it has the rights.  But hey, having an explicit command line switch to control that behaviour is still fine by me.

-
Sergiu
Reply all
Reply to author
Forward
0 new messages