From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Soo Subject: Re: Having a problem invoking curl only when using guix pull Date: Thu, 16 May 2019 17:21:29 -0700 Message-ID: <4F8CD8F8-47AF-4C3D-8FD4-95B2ABF40AA6@asu.edu> References: <98FF32C2-9951-45EE-A08D-DBED578C004A@inskydata.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:50388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRQcy-0007YX-Iu for help-guix@gnu.org; Thu, 16 May 2019 20:21:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRQcx-0007zs-37 for help-guix@gnu.org; Thu, 16 May 2019 20:21:36 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:39165) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hRQcw-0007yx-MQ for help-guix@gnu.org; Thu, 16 May 2019 20:21:35 -0400 Received: by mail-pg1-x52b.google.com with SMTP id w22so2358453pgi.6 for ; Thu, 16 May 2019 17:21:33 -0700 (PDT) In-Reply-To: <98FF32C2-9951-45EE-A08D-DBED578C004A@inskydata.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Brian Woodcox Cc: help-guix@gnu.org Hi Brian, Others may correct me if I=E2=80=99m wrong here, but during the build phase,= network io is off limits. This is since there is not way to reliably guaran= tee the contents of things gotten over the network remain unchanged between b= uilds, and so would break the immutability guarantees of the package system.= =20 Again, I could be wrong, I hope others will correct me.=20 - John On May 16, 2019, at 3:53 PM, Brian Woodcox wrote: >> Perhaps all you need is to include the curl package in your package's >> native-inputs field. >>=20 >> Also as a side note, I'm not entirely sure if using open-input-pipe would= be >> considered good practice for packages as far as reproducibility is concer= ned. >> Perhaps someone else can comment on that. >> But another option you might want to consider is using the built in web m= odules. >> For example: >>=20 >> #:use-module (web client) >> #:use-module (web uri) >> ... >> (let* ((out (call-with-values (lambda () (http-get (string->uri %api-u= rl))) >> (lambda (response body) body))) >> ... >>=20 >> I'm not sure if that's the most elegant way to do it, but it seems to wor= k. >> There's also a curl module for guile, although I'm not sure if guix will l= et you >> import it or not. >=20 > Hi ison, >=20 > Unfortunately that doesn=E2=80=99t work, due to tls not being available. >=20 > See the bug I reported here =E2=80=94> https://lists.gnu.org/archive/html/= bug-guile/2019-04/msg00008.html >=20 > Thanks for the effort though. >=20 > Brian.