Back from the time before I was using NixOS, I have a bunch of perl scripts that I want to continue to use as before. I have already changed the shebang to #!/usr/bin/env perl, but it seems that it won’t pick up Perl packages that I installed globally, via /etc/nixos/configuration.nix, where I include, say, perlPackages.XMLSimple in the packages.
I can run the script in a nix-shell -p perl perlPackages.XMLSimple.
I understand it’s cleaner to package my scripts in nix derivations, or at least use shell.nix and direnv for a per-project environments… but to ~cater for my laziness~ allow a incremental transition, is there a way to install perl packages globally?
Not sure about installing perl packages globally, but I’m sure there should be a way. In the meantime, you might be able to work out a quick and dirty solution by adding a nix-shell shebang to your scripts.