Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nixos (and others) compatibility #801

Merged
merged 3 commits into from
Jun 2, 2024
Merged

Conversation

jmaslak
Copy link
Contributor

@jmaslak jmaslak commented May 24, 2024

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.

Copy link
Owner

@gugod gugod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me. I'll merge the PR once I unbreak whatever I broke under the github workflow directory....

BTW The change in META.json does not seem to be necessary, and it will most likely be undone by the the release procedure, since I pretty much let mbtiny manage the content of META.json these days...

@@ -49,7 +49,8 @@
"Test::Output" : "1.03",
"Test::Simple" : "1.001002",
"Test::Spec" : "0.49",
"Test::TempDir::Tiny" : "0.016"
"Test::TempDir::Tiny" : "0.016",
"Test::Which" : "1.27"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not look like Test::Which is directly used in the new test, we can probably remove this change.

Actually I pretty much just depend on mbtiny to generate META.json / META.yml for me these days...

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting... CI failed at missing Test::Switch. I guess I'll need to tweak how I use mbtiny a little bit to accommodate this addition.

Comment on lines +2884 to +2886
if [ -o hashall ] ; then
hash -r
fi
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A very nice little detail that I've been missing... thanks for adding this!

@gugod gugod merged commit 6982c9f into gugod:develop Jun 2, 2024
3 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants