Hello, Sorry, I realize I was not clear enough. Attached is an example of a script written in R that has non-trivial recursive dependencies. You can run the example as: guix environment --ad-hoc --container -l package.scm -- hello You will normally see something like: $ guix environment --ad-hoc --container -l /tmp/package.scm -- hello # A tibble: 10 x 2 x y 1 1 1 2 2 4 3 3 9 4 4 16 5 5 25 6 6 36 7 7 49 8 8 64 9 9 81 10 10 100 sh: rm: command not found If you look at the package definition, you see that I call wrap-program in order to set the R_LIBS_SITE environment variable. The components of R_LIBS_SITE is the R dependencies of my package, and their recursive R dependencies. But I don't know how to get them. I hope this example is better at explaining the problem.