[Nix-dev] Problem with the SSL CA cert

4levels 4levels at gmail.com
Tue Mar 1 13:19:25 CET 2016


Hi Stewart,

I recently stumbled upon a similar issue (with an s3 backup script) and
this morning with curl.  I was happy to see that the proposed solution by
Guillaume Maudoux fixed my curl calls as well, so I hope this helps you
too!  He even created an issue for it:
https://github.com/NixOS/nixpkgs/issues/8486
In short, I just add the following to the service config section

..
after = [ ... ];environment = {  inherit
(config.environment.variables) SSL_CERT_FILE;};
path = [ pkgs.curl ];
script = "...";
..


Kind regards,

Erik

On Mon, Feb 29, 2016 at 3:34 PM stewart mackenzie <setori88 at gmail.com>
wrote:

> We can manually curl for the files, we can manually run cargo, but as
> soon as you run it through nix it fails.
>
> --- snip ---
>
> Fetching /tmp/nix-build-development_test-fetch.drv-0/fvm to
> /nix/store/b73ag3bvlrcchz791r1ijfilbyyigv3d-development_test-fetch
> Fetching
> /tmp/nix-build-capnpc-rust-2015-12-07-fetch.drv-0/capnpc-rust-1123a4f5de32f0300f1a6b8014b6c3525e170fa9-src
> to /nix/store/0p4fy98wnwdxv1phizj2wrx649c8yxgd-capnpc-rust-2015-12-07-fetch
> Using rust registry from
> /nix/store/z3wfziqiyi2sr4pq5rpvbzdpg9z9vzpr-rustRegistry-2016-02-28-c1f041c
> Using rust registry from
> /nix/store/z3wfziqiyi2sr4pq5rpvbzdpg9z9vzpr-rustRegistry-2016-02-28-c1f041c
>     Updating registry
>
> `file:///nix/store/z3wfziqiyi2sr4pq5rpvbzdpg9z9vzpr-rustRegistry-2016-02-28-c1f041c`
>     Updating registry
>
> `file:///nix/store/z3wfziqiyi2sr4pq5rpvbzdpg9z9vzpr-rustRegistry-2016-02-28-c1f041c`
>  Downloading libloading v0.2.1 (registry
>
> file:///nix/store/z3wfziqiyi2sr4pq5rpvbzdpg9z9vzpr-rustRegistry-2016-02-28-c1f041c)
>  Downloading byteorder v0.4.2 (registry
>
> file:///nix/store/z3wfziqiyi2sr4pq5rpvbzdpg9z9vzpr-rustRegistry-2016-02-28-c1f041c)
> unable to get packages from source
>
> Caused by:
>   failed to download package `byteorder v0.4.2 (registry
>
> file:///nix/store/z3wfziqiyi2sr4pq5rpvbzdpg9z9vzpr-rustRegistry-2016-02-28-c1f041c)`
> from https://crates.io/api/v1/crates/byteorder/0.4.2/download
>
> Caused by:
>   Problem with the SSL CA cert (path? access rights?)
> unable to get packages from source
>
> --- snip ---
>
> cacert is in configuration.nix
>
> What gives?
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160301/9419ced4/attachment-0001.html 


More information about the nix-dev mailing list