find-runtime-roots.pl: Don't hardcode /nix/store
This commit is contained in:
parent
0374d94437
commit
4ddd077bfa
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Nix::Utils;
|
use Nix::Utils;
|
||||||
|
use Nix::Config;
|
||||||
|
|
||||||
|
|
||||||
sub readProc {
|
sub readProc {
|
||||||
|
@ -39,7 +40,7 @@ sub readProc {
|
||||||
# Get all store paths that appear in the environment of this process.
|
# Get all store paths that appear in the environment of this process.
|
||||||
eval {
|
eval {
|
||||||
my $env = Nix::Utils::readFile "$process/environ";
|
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;
|
print "$_\n" foreach @matches;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue