@@ -69,6 +69,11 @@ stdenv.mkDerivation rec {
70 installTargets = [ "install" "install-info" "install-pdf" ];
70 installTargets = [ "install" "install-info" "install-pdf" ];
72+ # The store path to "which" is baked into src/library/base/R/unix/system.unix.R,
73+ # but Nix cannot detect it as a run-time dependency because the installed file
74+ # is compiled and compressed, which hides the store path.
75+ postInstall = "echo ${which} > $out/nix-support/undetected-runtime-dependencies";
72 doCheck = true;
77 doCheck = true;
73 preCheck = "export TZ=CET; bin/Rscript -e 'sessionInfo()'";
78 preCheck = "export TZ=CET; bin/Rscript -e 'sessionInfo()'";