about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-04-26T10·15+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-04-26T10·15+0200
commit4ddd077bfa9ad497e795a7f60d7734daf62117c1 (patch)
tree53602086822409fd4760138f1ec043faf9983c56
parent0374d9443732c184ab054a926058b9c5b973198f (diff)
find-runtime-roots.pl: Don't hardcode /nix/store
-rwxr-xr-xscripts/find-runtime-roots.pl.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/find-runtime-roots.pl.in b/scripts/find-runtime-roots.pl.in
index 5c2d4bed9180..e1a2dde556b6 100755
--- a/scripts/find-runtime-roots.pl.in
+++ b/scripts/find-runtime-roots.pl.in
@@ -2,6 +2,7 @@
 
 use strict;
 use Nix::Utils;
+use Nix::Config;
 
 
 sub readProc {
@@ -39,7 +40,7 @@ sub readProc {
         # 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;
+            my @matches = $env =~ /\Q$Nix::Config::storeDir\E\/[0-9a-z]+[0-9a-zA-Z\+\-\._\?=]*/g;
             print "$_\n" foreach @matches;
         }
     }