Using the zef package manager on NixOS

I’m trying to use perl6 on my nixos system, and so far I’ve successfully installed raku and zef. Here is the (slightly convoluted) process I followed:

I’m able to run the raku repl just fine, but I’m having a bit of trouble installing things with zef. Running nix-shell -p readline --run "zef install Readline" fails with a bunch of Cannot locate native library '(null)': cannot open shared object file: No such file or directory errors. How do I get zef to work properly with Nix?

ping @volth in case they have some wisdom to share.

@volth any suggestions?

I have no experience with Perl6
I switched to Perl 8 - The real future of perl even before Perl6 was stabilized.

@Bleu-Box Hi!

For native libraries raku needs to find them in the LD_LIBRARY_PATH.

I’m working on setting up a rakuPackage function for Nix that handles native libraries (by propagating LD_LIBRARY_PATH trough a setup-hook). Have a look at the rakuPackage branch of GitHub - stigtsp/nur if you’re interested which contains derivations for a few modules depending on native libraries (like OpenSSL). It’s still work in progress, I hope to work a bit more on it this month.

A lot of the work has been based on GitHub - chloekek/crai: Cryogenic Raku Archive Index and GitHub - chloekek/raku-nix: Build Raku modules with Nix! Also includes Nix derivations for community modules from CPAN and GitHub. , so these repos might be worth checking out.

1 Like

@Bleu-Box note that rakudo-2020.01 is now available in nixpkgs-unstable

1 Like

Is there any news with regard to rakuPackages?