How to develop perl6 on nixos?

rakudo (the perl6 compiler) is in nixpkgs, however, I seem unable to find any modules for perl6.

I tried looking into replacing the compiler on perl.withPackages, but perl5 and perl6 packages are not compatible across versions.

Any ideas?

There are only a dozen people which do something with perl5-modules.nix
It might be so that you are the only perl6 user over there.
So perl6-modules.nix is to be made from scratch.

I’ve created some derivations for the 2019.07.1 versions of rakudo, nqp, moarvm and zef, and was looking to do a PR on nixpkgs for those if there is any interest?

There are some reproucibility issues still - and need to wrap my head around how to do rakudo.withPackages.


Added Rakudo 2019.07.1 and friends to my NUR repo for easier testing. Cachix is enabled if you want to use prebuilt binaries.

zef is also available, and will install modules in $HOME/.perl6, However, modules with native dependencies will not work out of the box.

$ nix-shell -p nur.repos.sgo.rakudo --run "perl6 -e 'say \"\c[BUTTERFLY]\"'"
$ nix-shell -p nur.repos.sgo.zef --run "zef install MIME::Base64"
===> Searching for: MIME::Base64
===> Updating cpan mirror:
===> Updating p6c mirror:
===> Updated p6c mirror:
===> Updated cpan mirror:
===> Testing: MIME::Base64:ver<1.2.1>:auth<github:retupmoca>
===> Testing [OK] for MIME::Base64:ver<1.2.1>:auth<github:retupmoca>
===> Installing: MIME::Base64:ver<1.2.1>:auth<github:retupmoca>

This is very much a work in progress, and I’d love some feedback :smile:


  • Add buildRakudoPackage helper and rakudo-packages.nix similar to perl5
  • Add rakudo.withPackages wrapper
  • Provide Readline or Linenoise module
  • Look at making rakudo, nqp, moarvm reproducible
  • Do a PR on nixpkgs
1 Like

I’m also trying to get into raku development and was wondering if you’ve been able to figure out how to install zef packages (see this topic). I’m still pretty new to Nix, so is there some sort of process I should go through to get zef to find the right C libraries?

1 Like