From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QFbtEnFk2GH3VQEAgWs5BA (envelope-from ) for ; Fri, 07 Jan 2022 17:04:01 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2ISED3Fk2GEHPQAAauVa8A (envelope-from ) for ; Fri, 07 Jan 2022 17:04:01 +0100 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 D9507344A1 for ; Fri, 7 Jan 2022 17:04:00 +0100 (CET) Received: from localhost ([::1]:45136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5rih-0003F9-KP for larch@yhetil.org; Fri, 07 Jan 2022 11:03:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5rgu-0000dY-L7 for guix-devel@gnu.org; Fri, 07 Jan 2022 11:02:08 -0500 Received: from mail-m972.mail.163.com ([123.126.97.2]:53897) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5rgk-00009h-Vu for guix-devel@gnu.org; Fri, 07 Jan 2022 11:02:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=ivTl8 Z+iegCvs50cQm+p5o7JS3LxfYoQxam3MRfjnoY=; b=H69Q2LWBv4pG6xJaT0eHa VyFLiHl++zmMgZEtzE/pr/6ckKLgEMs9uKwiak1rdBhvpHPxWozj5m+LdHl+sIxn jni3Z3omHtRvgMY080XDAV7mahVZdK58q2Ohti7Z8rlyWns9c7GdU3K8TINPmZas gUqN3vTojr7qmdH9y7q37U= Received: from asus-laptop (unknown [27.38.116.62]) by smtp2 (Coremail) with SMTP id GtxpCgC3eIxWYNhhMuXPPw--.32954S2; Fri, 07 Jan 2022 23:46:31 +0800 (CST) User-agent: mu4e 1.6.10; emacs 27.2 From: Zhu Zihao To: guix-devel@gnu.org Subject: Re: search-input-file vs (assoc-ref inputs) Date: Fri, 07 Jan 2022 23:34:11 +0800 Message-ID: <86y23rblbz.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-CM-TRANSID: GtxpCgC3eIxWYNhhMuXPPw--.32954S2 X-Coremail-Antispam: 1Uf129KBjvJXoWrtFy3Kr18tr1xJw4DWw4Durg_yoW8Jr48pF Wagr1xtrn0kF1vy39IyFn3uFWFk3WDJrWrW3y5J3yDtrn8GryDZrZ3KFW5Za9rX347A3y5 G3yjgws8ZayDCa7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zEdgAcUUUUU= X-Originating-IP: [27.38.116.62] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/1tbiFBeBr1aD+yxZmQAAsv Received-SPF: pass client-ip=123.126.97.2; envelope-from=all_but_last@163.com; helo=mail-m972.mail.163.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641571440; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ivTl8Z+iegCvs50cQm+p5o7JS3LxfYoQxam3MRfjnoY=; b=WfGTBeUDVx0FAlmLxOJ0u6dRxdC4IEyBgA1/MKwfXB89vU5aLvEh6V77FfXL30FQk9k7hx p0GzFCXJg9U2NChaL1CmGG50pwM+jAb3RDpLZebO5gE6rcFVCW+r3KBUWovy/Y6lxS0hWm Pm4bNNZdIRfMejYkdI53ZiDvdVSH1MsBPGzZ5hkytXMFyncPv1bmT/A3MM9GdpRe8Gy3bu b0nIs/s7Ow2FGOOwWKRUHrtSEaltYTej8OFnwBK17T+V/Ihl1B3U/GdEyHmShyKPQFbxWR DnGyBPleTNzVbjXLj3+Lctkajcmw63RpR8v5N6skJ+5ihndap4CJQ1+un+lccA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641571440; a=rsa-sha256; cv=none; b=bF3UgNq8HGwkxRBzMyKqyyd29rZLaj23JRhzyHgVLdvovILe2TnLFDAipMDJS20Uvejm0K tFLBqoFUPhNKw/EG66DBReAq+rhDc9BgqtvVs0jw3J2QuWQGYe1sPFRJKrWMUex2MH2pUT A2WuwIpHZ0X57yyJ8qjIxHcIxEULIU5pW9nZycvRkNR5USvlgLPW4e4Wxgl2rWJQKKy7uM K14HeQYVHifPS1oouKVyZ8gXs7ftk1rLMtGzBcA0N2Hiyfit5lRUEUBP4GGtr+scAvygZ8 2beWcT2hIYYrFt2CUZa0KlYbBNrCCSnXtHod9fPYtmBNgzUuVpGdNh3e7pegDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=163.com header.s=s110527 header.b=H69Q2LWB; dmarc=pass (policy=none) header.from=163.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.90 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=163.com header.s=s110527 header.b=H69Q2LWB; dmarc=pass (policy=none) header.from=163.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D9507344A1 X-Spam-Score: -4.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: kVP7jhuY6OtH --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Some of my concern about label-less style inputs. 1. How can we refer to a non-package input? Some code might use something like (inputs `(("xxxx.patch" ,(origin ....)))) If I want to replace this patch, I can simply use list operations from SRFI-1 to manipulate it. But in label-less style, there's no label for a object. Packagers may try to embed these objects into the build expression using `ungexp`. But I think it violates the dependency inversion principle(We don't rely on label, but rely on concrete object). 2. libgcc, libgcc is a specific output of gcc. IIUC in build expression, it shares label with gcc, gcc is an implicit input in many build system. It's not so convenience for me to refer libgcc. For example, I want to set up the `LD_LIBRARY_PATH` for testing. it's better to use `(string-append (this-package-inputs "libgcc") "/lib")`. But I can't do this, the label of libgcc is "hidden". `search-input-directory` doesn't work here because "/lib" is a common directory exists in many package. I have to write `(dirname (search-input-file input "libstdc++.so.6"))`, so ugly... =2D-=20 Retrieve my PGP public key: gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F Zihao --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYdhgQBUcYWxsX2J1dF9s YXN0QDE2My5jb20ACgkQZjl/hPdmk/kenAD8C/MNMsFvq6SJqyQGwUUbe5jmfVcO /CSVV7latxJP/iUA/1lVxWBA+F/nPQ4Fs0DS2UZuXkbP470Jdz2UbEhJ+X0J =nrd9 -----END PGP SIGNATURE----- --=-=-=--