What to install to make LWP::Protocol::https work?

I’m trying to package a Perl application. I’m now able to run it, but when running /nix/store/*-tks-1.0.32/bin/tks --list=week to retrieve my timesheets it prints an error message like this:

Got non-200 (501) status from mechanize: Error GETing https://[…]: Protocol scheme ‘https’ is not supported (LWP::Protocol::https not installed) at /nix/store/*-tks-1.0.32/lib/perl5/site_perl/TKS/Backend/WRMSWeb.pm line 60.

I tried fixing it by installing LWPProtocolHttps, but I’m still getting the same error. I also tried installing CryptSSLeay as suggested elsewhere, but that didn’t help. How do I make LWP::Protocol::https actually work?

I verified that the URL in question gives an HTTP 200 OK response in a browser.

You’re looking at the correct perl package. I maintain some infrastructure which depends on that perl package. If I can find the time I’ll try to take a look at your branch tonight to see if anything jumps out at me.

Something like this will work for you. Maybe @volth will offer a better option as I’m not entirely satisfied with the -I flag in the postInstall but didn’t have any better idea in the short time I looked… :man_shrugging:


1 Like

This supposes to happen magically
For example ${perlPackages.LWP}/bin/lwp-download has -I ${perlPackages.LWP}/lib/perl5/site_perl in the shebang command line