about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/find-runtime-roots.pl.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/find-runtime-roots.pl.in b/scripts/find-runtime-roots.pl.in
index a53cefd4ef..5c2d4bed91 100755
--- a/scripts/find-runtime-roots.pl.in
+++ b/scripts/find-runtime-roots.pl.in
@@ -35,6 +35,13 @@ sub readProc {
             }
             close MAP;
         }
+
+        # Get all store paths that appear in the environment of this process.
+        eval {
+            my $env = Nix::Utils::readFile "$process/environ";
+            my @matches = $env =~ /\/nix\/store\/[0-9a-z]+[0-9a-zA-Z\+\-\._\?=]*/g;
+            print "$_\n" foreach @matches;
+        }
     }
 
     closedir DIR;