gugod / App-perlbrew

Manage perl installations in your $HOME
https://perlbrew.pl
Other
720 stars 216 forks source link

Nixos (and others) compatibility #801

Closed jmaslak closed 6 months ago

jmaslak commented 6 months ago

NixOS does not install a system Perl in a standard location (it uses either a global perl in /run/current-system/sw/bin or a Perl in the /nix/store/* tree. This patch allows someone to add an additional system perl library location via the PERLBREW_SYSTEM_PERL environmental variable.

In addition, NixOS configures the user's bash shell with the hashall option off. The bashrc file in Perlbrew executes hash -r which fails because hashing is disabled. This patch adds a check of the hashall option before attempting to clear the hash cache.

I'm open to any changes you might desire to accept this PR.