0

I'm fairly new to NixOS, but I'm trying to install App::cpm from CPAN.

I run the following:

cpan -i App::cpm

It chugs for a little bit then, it fails on Build::Tiny:

crypt.h: No such file or directory
  124 | #      include <crypt.h>

I looked through NixPkgs to try to see where the header lives, but I can't find anywhere to install this. I assume it's a systemPackage. Thanks.

1

1 Answer 1

1

You should typically install the packages directly from nix if it is available, as it will automatically take care of compiling stuff if needed (in your tests, it is trying to compile it but C library are not available outside of build commands so it fails… if you really want you can certainly drop into a nix-shell -p gcc but there is not so much benefit here since cpm is already packaged). For instance, here if you just type:

$ nix-shell -p perl perlPackages.Appcpm

you will get into a shell with cpm installed. The precise name of the package can be searched in https://search.nixos.org (or directly in the source)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .