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 EO5LKdaAxV9GGAAA0tVLHw (envelope-from ) for ; Mon, 30 Nov 2020 23:31:34 +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 YMcNJdaAxV/6GgAA1q6Kng (envelope-from ) for ; Mon, 30 Nov 2020 23:31:34 +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 291DE9401BC for ; Mon, 30 Nov 2020 23:31:34 +0000 (UTC) Received: from localhost ([::1]:42192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjsdp-0001dG-4f for larch@yhetil.org; Mon, 30 Nov 2020 18:31:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjsde-0001bm-NI for help-guix@gnu.org; Mon, 30 Nov 2020 18:31:22 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:45569) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjsdc-00070d-RN for help-guix@gnu.org; Mon, 30 Nov 2020 18:31:22 -0500 Received: by mail-wr1-x42b.google.com with SMTP id t4so18636121wrr.12 for ; Mon, 30 Nov 2020 15:31:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=E3IhGa9bClfi4xU3il9hbiyUtlCwbe4rgGFtvoDsVWE=; b=MK7mH/am8xy9p0dj0p5y8ry1V5dgtX+fvrM9KL/MZYJhL7Z4gylBFLeTgybe+j0SSA Qr1dDljKWBQXlFvZxhrFXPlcD8k6CGj/9LSyvm5XtLqI5IQUSW+QomuTR66lsvoeSM4C AabZoKYEe5eLVBuvSyV3uWbSlYdamatYkWqYDCcvkTa9Y0rGc3lvSK1RATzTzLx/WsCE gxNNf9dY1F8UZZTBstDuVjW466aoJqG7pn8DvIX6hepUbK50RGq5yHHa4EwHovGnjxCY M55akH6ztxZFi4FfNQoQwyv+NowPtKmm1kH7zd0dBuCzMHikA8xqTBLQcBAVIX7pmWNM SWOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=E3IhGa9bClfi4xU3il9hbiyUtlCwbe4rgGFtvoDsVWE=; b=CkCn2eiHj4YLwAqZvUuVCTtaslhoD4GRNLpHunFuohQLS+vU3TtzfX83DlCfZDzV21 7pnZf/KEcH1lg8U6Y8HERHVcsE/tpk2Au5g30GudLg6e5PGbn543htYZe7xNgi2DiD2U P6uXMwtvsptbuNLYjbh7P8KPQob1VbWHJ6JVJy77DeGMpRowJkp/xGLVjzK0kPP/lODM BWYv4zX4bQC4YsMRiSLTLFUeW9zEF45iNfhEdcY9cp70O3MzhHwZ75haabQE5gMljB5v hEY0Wth6UqiyWVGBCcbkiK5i9CyLstYLDgdF8y8saxHPtYvKwfyfgmHeQioyXoeZj4q2 GTvg== X-Gm-Message-State: AOAM530TV2e3GOtjclB8s1aNFOxQuwWc/NszzZffKxofQFfyFBLvSgeR m18qji1EMbj+H1o4LgDhWTM= X-Google-Smtp-Source: ABdhPJzsv11gIqIltcsS/zUmupKkTt7n8HfxzxBLXFQuDd5yj/g9Z9dvlc0Nc3GVa3jXBwD3HXbxlg== X-Received: by 2002:a5d:4e87:: with SMTP id e7mr32084040wru.352.1606779066594; Mon, 30 Nov 2020 15:31:06 -0800 (PST) Received: from lili ([88.126.110.68]) by smtp.gmail.com with ESMTPSA id w15sm30009614wrp.52.2020.11.30.15.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2020 15:31:05 -0800 (PST) From: zimoun To: Julien Lepiller , help-guix@gnu.org, "Bonface M. K." Subject: Re: How do you write a package's deps to a file? In-Reply-To: References: <86mtyyzuag.fsf@gmail.com> Date: Tue, 01 Dec 2020 00:23:10 +0100 Message-ID: <868saiwhsx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42b.google.com 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=ham autolearn_force=no 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: , Cc: Pjotr Prins Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.99 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=MK7mH/am; 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-Migadu-Queue-Id: 291DE9401BC X-Spam-Score: -1.99 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: lnOEDFOkQxFA Hi, >>#+begin_src scheme >>(add-after 'install 'create-dependency-file >> (lambda* (#:key inputs outputs #:allow-other-keys) [...] >> (map (lambda (input) >> (let ((name (car input))) (pk input) >> ,(package-version >> (specification->package name)) " | " [...] >> inputs))) >> )) >> )) >>#+end_src >> >>That ^^ doesn't seem to work as I'd like it to. The output(truncated) >>looks something like: It is expected, as Julien explained. Well, I have tried to uses modules in the builder in order to import =E2=80=99specification->package=E2=80=99 but I failed. There is still some= thing a bit unclear for me: the arguments #:modules vs =E2=80=99use-modules=E2=80=99. = And for example, I miss why --8<---------------cut here---------------start------------->8--- (arguments `(#:modules ((gnu packages)) =E2=80=A6=20=20=20=20=20 --8<---------------cut here---------------end--------------->8--- fails. Moreover=E2=80=A6 >>Notice that the version, home page and description >>are repeated across rows. Herein lies my question: >>How would you fetch the details of the inputs(like >>version, home-page, description) etc etc from a >>modifed phase. Do I need to create a closure from >>which I can import the modules like say _(use (gnu >>packages))_. How do I do that if that's the case? =E2=80=A6I am not convinced it is the right level to extract the information you need since =E2=80=99input=E2=80=99 is, e.g., ;;; (("source" . "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.= tar.gz")) ;;; (("grep" . "/gnu/store/yhqc5imq7sn2sf9f48dj4gk12y4kw4s4-grep-3.4")) ;;; (("libc:static" . "/gnu/store/s3dcqzwqaakv1yx37by9chksdbkgih17-glibc-= 2.31-static")) =20=20 therefore you need =E2=80=99specification->package=E2=80=99 to find back th= e package mapping to the string in order to access the metadata (version, home-page, etc.). Aside the issue that some do not have corresponding packages (source, libc:static for instance). Aside the issue of multiple versions, for instance compare the version of the =E2=80=99gcc=E2= =80=99 input of =E2=80=99hello=E2=80=99 returning the string =E2=80=9Cgcc=E2=80=9D with: --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> (specification->package "gcc") guix repl: package 'gcc' has been superseded by 'gcc-toolchain' $1 =3D # --8<---------------cut here---------------end--------------->8--- What do you want? Get the list of inputs and their metadata when typing =E2=80=9Cguix install foo=E2=80=9D? And this list becoming part of the out= puts? Or simply get somehow the list of inputs and their metadata? Which is straightforward. Well, I am interested by the answer of: is it possible to get the metadata of the inputs in phases? All the best, simon