R: explicitly declare `which` as a run-time dependency
Fixes https://github.com/NixOS/nixpkgs/issues/58963.
Closes https://github.com/NixOS/nixpkgs/pull/58989.
commitcbade453ac4ae2f86e514ba2091f86974b7a9d86
authorrhokue <48916416+rhokue@users.noreply.github.com>
dateFri 5 Apr 2019, 03:08 (8 years ago)
parentca494bf
pkgs/applications/science/math/R/default.nix+5
@@ -69,6 +69,11 @@ stdenv.mkDerivation rec {
6969
7070 installTargets = [ "install" "install-info" "install-pdf" ];
7171
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";
76+
7277 doCheck = true;
7378 preCheck = "export TZ=CET; bin/Rscript -e 'sessionInfo()'";
7479