writePerl
pkgs.writers.writePerl
Functor
Docs pulled from | This Revision | about 1 hour ago
writePerl takes a name an attributeset with libraries and some perl sourcecode and returns an executable
Examples
pkgs.writers.writePerl
usage example
writePerl "example" { libraries = [ pkgs.perlPackages.boolean ]; } ''
use boolean;
print "Howdy!\n" if true;
''
Noogle detected
This is a Functor
Learn about functors
Implementation
The following is the current implementation of this function.
writePerl =
name:
{
libraries ? [ ],
...
}@args:
makeScriptWriter (
(builtins.removeAttrs args [ "libraries" ])
// {
interpreter = "${lib.getExe (pkgs.perl.withPackages (p: libraries))}";
}
) name;