From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aPF5IhJXVGe+cQAA62LTzQ:P1 (envelope-from ) for ; Sat, 07 Dec 2024 14:09:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id aPF5IhJXVGe+cQAA62LTzQ (envelope-from ) for ; Sat, 07 Dec 2024 15:09:22 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=uWX1l22G; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=mail header.b=VN+p5X2Z; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=ultrarare.space (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733580562; a=rsa-sha256; cv=none; b=AKd+5l2WuWE+bcAeSM8ZWw/FLyA+Yj+GGWBH9Xo8M4bItJ+8foH4QPBjcwQfDH8S0C10iY EsuHTR9sfd3hAoBD7ALnYWDJBcZ1oPxA0+AuUB7qJ66D0hjhUt8QVnnT0Ir/vz9aaAY3Sp zKoAvrUzpE1l54ooBfzvz/6Z7/qDAzNq4V0au72dogHGdfV+/hzw3FPk5mWLlBEDauTQ0u 097jS0iWFDDcomBd8xWTqkUHnCm4ax7yur2VxDUOwrAA84cSKyndNFvwGAfpNUM2L9NC0+ 27iHRXGCLdEBZ4IcV+up2hYewht+oIMJhxAPiIB54N9/taYnV65hlsWffepSlw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=uWX1l22G; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=mail header.b=VN+p5X2Z; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=ultrarare.space (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1733580562; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=3nEDKlEk0SQY9aitVa25+GDw6KND53NspWDBb3HSloY=; b=QL88ypVrApZa7X0PC0CIUQQP+spQnTcaRHqAOSscqOh3VfWQ640V2ScX06LmhnXxkmMXtJ N3mUeCnJ4zDVFMJRCtOSRZNWoBTx+wvDT8jbIA6sFDhaSKgf5Yu86cbQoK+TMV+biN8o1d JxknXb3oxpXOmblTMUfPH/XPMO+9GxR3IzbYGmr4rDacXbMlEgDUWIbH8ovEQhMG2CA6sR NQJnvR4Iap4ISP0SoIe2JBHv7tD3XxbiqC3TttzjoDa4Qr3t0YsA3i47jVqkAuH27RkiNr Jw/aTUfuH+NaoN/C+/vMWJt9rycwipOGm7u5BUpyAmoZybi6k736/aMJmrVGYQ== 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 7A04B87D3B for ; Sat, 07 Dec 2024 15:09:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJvUX-0000mG-68; Sat, 07 Dec 2024 09:09:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJvUV-0000m1-Qe for bug-guix@gnu.org; Sat, 07 Dec 2024 09:09:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tJvUV-0000AK-Hd for bug-guix@gnu.org; Sat, 07 Dec 2024 09:09:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=3nEDKlEk0SQY9aitVa25+GDw6KND53NspWDBb3HSloY=; b=uWX1l22GanMeVhCuUfriQW3kwWsDGQqPLA/ep9ZY20CqZ9H+BRSqzeMme0eol24TS09tM5KpNYMSRjXlqhQCubF4ZZnkH9KoCfUaHhzgtxVM8lB7JqR7M4VsmgUipErvIjMwqYpvVtm4h6osnMOB4FYTGLjUEdZbmnbX/7UxGjORdDDwT0V5dNFBcQkKd2Ha0I9BJZs7rOBWAEDf/9ZzguhS3qVRctfEy95eYO3KqoM3WEz3uuF0BZoCPWvP2GjovvEYaHp6tOWQxea24oWj9FZACeZOOM/DtgNY8+KPBaaAnmwB5DYYghAIw1Be5mIhnZtGXOEjAco1N1yd87XgKQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tJvUU-0007D8-JW; Sat, 07 Dec 2024 09:09:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#74217: Bootstrapping Zig with no Binary Blobs Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org, Ekaitz Zarraga Resent-Date: Sat, 07 Dec 2024 14:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74217 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 74217@debbugs.gnu.org Cc: Motiejus =?UTF-8?Q?Jak=C5=A1tys?= , =?UTF-8?Q?No=C3=A9?= Lopez , dan , Efraim Flashner , Ekaitz Zarraga Received: via spool by 74217-submit@debbugs.gnu.org id=B74217.173358049027637 (code B ref 74217); Sat, 07 Dec 2024 14:09:02 +0000 Received: (at 74217) by debbugs.gnu.org; 7 Dec 2024 14:08:10 +0000 Received: from localhost ([127.0.0.1]:46044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJvTd-0007Bg-MD for submit@debbugs.gnu.org; Sat, 07 Dec 2024 09:08:10 -0500 Received: from mx.boiledscript.com ([88.99.243.112]:54334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJvTa-0007BS-7C for 74217@debbugs.gnu.org; Sat, 07 Dec 2024 09:08:07 -0500 Date: Sat, 07 Dec 2024 22:07:22 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1733580454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3nEDKlEk0SQY9aitVa25+GDw6KND53NspWDBb3HSloY=; b=VN+p5X2Z8aTPPDB5XQ6bModTJUItvLEx9XztHyPh2K8KdY2UB2rt7lF9mtdVHYga3D/+NO PPj9X91XHZlyp7V7wOcK5+s7lXrUvQsePKuy97/ygZH9OGrgibEmZU3mMNkpFqc238G1dr Q7PEeFBFzhFyK6dv9jcuR39Zo6z6VhXmcJy8ow6FcIEAZg2H8qjeZSLTa/tX0f8I6D3czD QLwTuOzgLj6gnw61CaabJQIsRSCn2mhfiKzmn9nWQE5acprupPkrWVfN/xFMZUYWmRLK9B +0u6rgN5dWahTK6BqO9LmigK6+OaHsXdrbXVNP3aXNZAiYUFnSGJRvVjTgA/Vg== Message-ID: <87o71nh9id.wl-hako@ultrarare.space> From: Hilton Chain In-Reply-To: <87r06mprul.wl-hako@ultrarare.space> References: <87ldxngjy4.wl-hako@ultrarare.space> <878qtmvh2i.wl-hako@ultrarare.space> <877c96vd3u.wl-hako@ultrarare.space> <874j4auz7j.wl-hako@ultrarare.space> <87v7wqtbjq.wl-hako@ultrarare.space> <878qtl5g55.wl-hako@ultrarare.space> <87jzd47enj.wl-hako@ultrarare.space> <87a5dx7w1n.wl-hako@ultrarare.space> <87frnns6wh.wl-hako@ultrarare.space> <87ed34viqk.wl-hako@ultrarare.space> <87a5djipk6.wl-hako@ultrarare.space> <87h67mbrdy.wl-hako@ultrarare.space> <87r06mprul.wl-hako@ultrarare.space> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.65 X-Spam-Score: -4.65 X-Migadu-Queue-Id: 7A04B87D3B X-Migadu-Scanner: mx12.migadu.com X-TUID: Y1hNf5fMPAam On Thu, 05 Dec 2024 14:27:14 +0800, Hilton Chain wrote: > > On Mon, 02 Dec 2024 13:11:53 +0800, > Hilton Chain wrote: > > > > On Thu, 28 Nov 2024 19:08:09 +0800, > > Hilton Chain wrote: > > > > > > Made "#:zig-inputs" a private keyword, its value will be passed to inputs like > > > cargo-build-system (the build system doesn't extract the whole closure for > > > now, this can be added in the future depending on how Zig ecosystem develops). > > > > Just thought if we can avoid using #:zig-inputs, it turns out doing so is quite > > easy: > > Added two procedures producing origin snippets in (gnu packages zig-xyz). > > 'add-build.zig.zon' for generating build.zig.zon, currently unused. > 'rename-zig-dependencies' for replacing #:zig-inputs. Moved to (gnu packages zig). > I'll try to make unpack-dependencies phase reading dependencies from > build.zig.zon instead of input labels so that we can have more specificity. Changed install path for Zig packages to /src/zig, added a GUIX_ZIG_PACKAGE_PATH search path (currently only in Zig 0.13 to avoid rebuilds). Phase unpack-dependencies is changed to: 1. Find dependencies in build.zig.zon. 2. Find inputs in GUIX_ZIG_PACKAGE_PATH. 3. Per dependency, invoke "zig fetch" on matched input ('^dependency[-.]?', this pattern expands available specificity to minor version, in case it's unavoidable to propagate multiple versions of the same package into build environment). With above changes, it's possible to reuse dependencies packaged in Guix, for example: --8<---------------cut here---------------start------------->8--- cd $(mktemp -d) cp --recursive --no-preserve=all $(<...>/pre-inst-env guix build --source zig-httpz)/. . <...>/pre-inst-env guix shell --development zig-httpz <...>/pre-inst-env guile -c "((@@ (guix build zig-build-system) unpack-dependencies))" zig build --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- cd $(mktemp -d) git clone https://github.com/karlseguin/http.zig && cd http.zig git checkout zig-0.13 <...>/pre-inst-env guile -c "(eval ((@ (gnu packages zig) rename-zig-dependencies) '((\"metrics\" . \"zig-metrics\") (\"websocket\" . \"zig-websocket\"))) (interaction-environment))" <...>/pre-inst-env guix shell zig zig-metrics zig-websocket <...>/pre-inst-env guile -c "((@@ (guix build zig-build-system) unpack-dependencies))" zig build --8<---------------cut here---------------end--------------->8---