Looking at Perl - Official NixOS Wiki seeking to add the non-packaged perl moduleAI::FANN seems complicated. In most other Linux:
install the development package fann-dev
runcpan AI:FANN or similar
works. I do not know how to run nix-generate-from-cpan.pl and add it to pkgs/top-level/perl-packages.nix. I just would like to make sure this is the only way to getting a non-packaged module to work?
It seems to be in maintainers/scripts/nix-generate-from-cpan.pl in the nixpkgs repo now, and packaged accordingly as a top-level attribute, so something like this should work:
Running the script does not install it. This script is a convenience script to automatically generate a nix expression for use else where. This is touched upon in the docs, as follows.
The output can be pasted into pkgs/top-level/perl-packages.nix or wherever else you need it.
This is just a warning to those who are upstreaming it that the license has not been automatically detected to be one in the hashset in the script and to verify and/or set it manually when upstreaming the package into nixpkgs.
You may need to add two extra parameters to the Makefile.PL script to indicate where to find the FANN library and include files if they are not installed on some standard locations. For instance: