From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OOTyBBnS9V4bMwAA0tVLHw (envelope-from ) for ; Fri, 26 Jun 2020 10:46:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6KrzABnS9V6XGgAA1q6Kng (envelope-from ) for ; Fri, 26 Jun 2020 10:46:49 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8FED394051E for ; Fri, 26 Jun 2020 10:46:48 +0000 (UTC) Received: from localhost ([::1]:36826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jolsb-0003qO-N4 for larch@yhetil.org; Fri, 26 Jun 2020 06:46:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jolqU-0001Pd-7J for help-guix@gnu.org; Fri, 26 Jun 2020 06:44:34 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:34622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jolqS-0000lr-If for help-guix@gnu.org; Fri, 26 Jun 2020 06:44:33 -0400 Received: by mail-wm1-x333.google.com with SMTP id u26so8617317wmn.1 for ; Fri, 26 Jun 2020 03:44:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=rr5WgCwWpF7P3aHrYBPdVvxdkx3sLNAFAA7/+srMEsc=; b=kSNcnvSkOinCC9zhkzEX2e9Fa4rEq+qiqyQ12FFtokna6LbpIvFo9E2JlkG64fq3Zi 2kwLvuG/+gZyUe4/SX9HhHzJYJGORUiLwxsxgONwun5OpEbjiu5fBFvpnSqSXUYvZV4C AFgcIgeb0ZaUKfFwMBuCIzC+mqkQFFsWCYhmLVANrkItF6LmJhlnjcoSJk6vKxCF8jvU WJPOIQ+d2NI5fDFc2XyWD1Bd998wVOkJmeiVO6DZu9v/REmeHsgCzRXdN7LY30e6E+VE 9On4FjgP7ye6J5Cy/zbGdSEv0vdGxABeUP3TYnIsOtdFP2QbOmAiEv+XazhUW98kiUhx pp5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=rr5WgCwWpF7P3aHrYBPdVvxdkx3sLNAFAA7/+srMEsc=; b=hiNFLWRzVdIXM4u/XEvUBbDy4jsXKI0tE4K816GDO4VXqcKsJR1WbM5bo9WNtPS/5z HTk2qPF631BTs/3hm+TThWvbFiQeRC0n/itwkO/GEeu6/qZ9AuHVL2BmnLT+gVTZWIkY uCw776eGxf/YAQ9RJuqEcgSJDLKI1oyEA0kfNTMmmE99zqpsLwCwyNm4H7Ym3qf7Jeo5 9StW4d4kWd3lIXElPWXDceiV3RyGS+GoLiqa4tj5gWUGxn/y7fL0iO/eTeLLKPuQzMHt yIlO6PndvzDTQf9k/Z/Z2o+PUQ+1/Ft34ohYxLV3rmQCARss/dl21MC/AZOrroFud7Gz DMKA== X-Gm-Message-State: AOAM530opc0WDN+h7QCIKi9aNMbtcU2DW/jCdNxSGNHAMxPXxgQKfDnO ZmEVny9PR0eb8Q/rgvtN5Gc= X-Google-Smtp-Source: ABdhPJzgSpYLFnglmLYELrRSxt8tcn1A3OUBGcRadI481d4SfnpdEWmz2c7jRthq3BBeI+3mya4FOw== X-Received: by 2002:a1c:e285:: with SMTP id z127mr2746320wmg.162.1593168271161; Fri, 26 Jun 2020 03:44:31 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id v3sm1407101wrq.57.2020.06.26.03.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 03:44:30 -0700 (PDT) From: zimoun To: Julien Lepiller , help-guix@gnu.org, Konrad Hinsen , Anthony Quizon Subject: Re: Building packages in REPL In-Reply-To: References: <86wo3u9mfi.fsf@gmail.com> Date: Fri, 26 Jun 2020 12:44:29 +0200 Message-ID: <86tuyy9kdu.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x333.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=kSNcnvSk; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: FTPMTT4WGtJM Hi Julien, On Fri, 26 Jun 2020 at 06:17, Julien Lepiller wrote: > One way to do this with the guix API is to get the derivation, then build it: > > (use-modules (guix derivations) (guix store) (gnu packages bash)) > (define package bash-minimal) > (define store (open-connection)) > (define der (package-derivation store package)) > (build-derivations store (list der)) > > Is that what you want? Yes, but provides something like: --8<---------------cut here---------------start------------->8--- (use-modules (guix store) (guix derivations) (guix packages)) (define (build-packages packages) (with-store store (let ((builds (map (lambda (package) (package-derivation store package)) packages))) (build-derivations store builds)))) (define (build-package package) (build-packages (list package))) --8<---------------cut here---------------end--------------->8--- Because otherwise, you need to know "package-derivation" and "build-derivation" and where they are (I run 'ag' or 'git-grep' to find them which is not handy). And for example, I knew it was possible but it was not "obvious". :-) Cheers, simon