From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EKYLDMMum2P0rAAAbAwnHQ (envelope-from ) for ; Thu, 15 Dec 2022 15:27:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MNARDMMum2MQ5AAA9RJhRA (envelope-from ) for ; Thu, 15 Dec 2022 15:27:15 +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 6ED7A26316 for ; Thu, 15 Dec 2022 15:27:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5pCM-0003Gf-4e; Thu, 15 Dec 2022 09:26:58 -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 1p5pCH-0003GN-CA for guix-devel@gnu.org; Thu, 15 Dec 2022 09:26:56 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5pCG-0006yP-Mo; Thu, 15 Dec 2022 09:26:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=2pTUhErnroNV82oky2uWE3Ig/DIQy5L4FETnKWMsYQA=; b=qqAr4LOFMsrKt/RiCUL2 JP+VTsEngFGDlwGRT3S0UEPQVyMcYpAD97olHFdeGjqliT4zw1/SPwjYQXg4cbIZHIOqnZn/Qg0U3 NQwMIn8hr64ecUllNlR0FuVhMoBR8mCOwyLc9tZ/BU1qvIgklGeJSpzNyWoL4sMG7cl8iyAINB+WZ 3B38fWi5rgB8H72j7TXWyIf7nImkGquZiXTrLqmOTkTousBFFH9yifoPU9eMyixkM2P2ESq3nE8jE 7VnJ0cUIzSZ4ZvBSPQ5qdI7I6zWAFtcFccoDlSkMJEPzUa7vtJBMoCpsoItqwOqMj6nITIsBZzRd1 oMwaRsJDoh29RQ==; Received: from [89.207.171.79] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5pCG-0006K8-2o; Thu, 15 Dec 2022 09:26:52 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "(" Cc: guix-devel@gnu.org, mekeor@posteo.de Subject: Re: [PATCH guix-artwork v2] website: posts: Add Dissecting Guix, Part 1: Derivations. References: <20221212193137.1264-1-paren@disroot.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 25 Frimaire an 231 de la =?utf-8?Q?R=C3=A9v?= =?utf-8?Q?olution=2C?= jour du Grillon X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 15 Dec 2022 15:26:48 +0100 In-Reply-To: <20221212193137.1264-1-paren@disroot.org> (paren@disroot.org's message of "Mon, 12 Dec 2022 19:31:37 +0000") Message-ID: <87h6xwpwt3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=qqAr4LOF; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671114435; a=rsa-sha256; cv=none; b=L+4OwrTwWDQkBdllLgc6ZzxAZzKlas2lZxbQIL7cJxxH0NGJ3hA0w+toRhH08nDX1V1jhL l0U/iC4ukdmNEvDm2lquacCdZ1Ad9Q33ZoVvlMsrzFB5BI9X1At0hfB80JIWhW6PMLZKGU 9wBXgCPBIkkLgtuIdAZHRtWoGkIRb837eLEYjuBk8FzOlysPW82If7o/hAvwFVBQS8uR+y NCHo3FK5sQZEwiiyqRwN9EhNzA5cr5w6YFPELrCnCbNys/RjOvQSEExib3+jmv8sRRSMjT Xj9Y/5C+vM6Eii61kVBfgwFtxBuTchjAjqkQeqjWLGeEtFdsfePYp0arasNhag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671114435; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=2pTUhErnroNV82oky2uWE3Ig/DIQy5L4FETnKWMsYQA=; b=B8nDEPhz6KrrAr9EzrvDKjMVuIkcAd0D+4cbWUGqd5+vFWojORkWCbjlTT+J/qCuxNk/4X JpQNisKkmouoRRNlQ91WvactWTWazlwWddw/9sSwUzczeQ1fhlY3tth59qA+v83LC8y32y zk3M/9Ccpv8TOkc79lKfIjpRD5r0agVOq+ppeB7+fzm7ekRw5OL4++by065qT+xm/9WPhx Tt731zj1dzu1TW02kYADoQccOSKUX38YTFqjarym+RNZNYp29I6GIsbLHheeWQNnvxqMh5 aKvhMSqoaM1irQ8FSZgzdDh7DO6epsYGIK6uxO9/dp51PTU+Rx3i1AqZ4+i78w== X-Migadu-Spam-Score: -7.37 X-Spam-Score: -7.37 X-Migadu-Queue-Id: 6ED7A26316 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=qqAr4LOF; 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"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn0.migadu.com X-TUID: IiJ7eNbqX64p Hello, "(" skribis: > * website/posts/dissecting-guix-1-derivations.md: New blog post. Neat! I think your plan for blog posts is really great; I=E2=80=99m sure it will be of great use to many. Perhaps we could schedule the first one a few days after the release (which should be on Monday, 19th)? And then schedule subsequent posts once per month or something? Anyway, I like this first post! Here are cosmetic suggestions: > +These concepts were originally described by Eelco Dolstra, the author of= Nix, in s/author/original author/ > +# `.drv` Files > + > +You've probably seen these being printed by the Guix CLI now and again. Please avoid abbreviations; if you want to use them, you can write =E2=80= =9CGuix command-line interface (CLI)=E2=80=9D the first time and just =E2=80=9CCLI= =E2=80=9D on subsequent iterations. Some abbreviations may look obvious to us, but I think it=E2=80=99s important to reduce assumptions about what the reader al= ready knows, especially since the goal is to help them learn. > +Derivations, represented in the daemon's eyes by `.drv` files, contain > +instructions for building store items. We can retrieve the paths of the= se > +`.drv` files with the `guix build --derivations` command: Perhaps you can add a paragraph showing package definitions, explaining that they get =E2=80=9Clowered=E2=80=9D to derivations, but that packagers = and users only ever manipulate high-level objects such as packages or operating systems, not derivations? > +The procedure we use to turn a high-level object like `` into a > +derivation is called `lower-object`; more on that in a future post. How= ever, > +this doesn't produce a derivation: > + > +```scheme > +(pk (lower-object irssi)) > +;;; (#) > +``` Maybe beforehand you can mention =E2=80=9C,lower irssi=E2=80=9D, to show th= at it exists and that there=E2=80=99s a simple way to peek at derivations, and only then dissect =E2=80=9C,lower=E2=80=9D? > +The returned object is a procedure that needs to be evaluated in the con= text of s/is a procedure/is a monadic value [in the store monad](=E2=80=A6)/ > +a store connection. We do this by first using `with-store` to connect t= o the > +store and bind the connection to a name, then wrapping the `lower-object= ` call > +with `run-with-store`: > + > +```scheme > +(define irssi-drv > + (pk (with-store %store > + (run-with-store %store > + (lower-object irssi))))) > +;;; (# /gnu/store/v5pd69j3hjs1fck4b5p9hd91wc8yf5qx-irssi-1.4.3 7fe1902b= 6140>) > + > +(define glib-drv > + (pk (with-store %store > + (run-with-store %store > + (lower-object glib))))) > +;;; (# /gnu/store/lp7k9ygvpwxgxjvmf8bix8d2aar0azr7-glib-2.70.2-bin /gnu= /store/22mkp8cr6rxg6w8br9q8dbymf51b44m8-glib-2.70.2-debug /gnu/store/a6qb5a= rvir4vm1zlkp4chnl7d8qzzd7x-glib-2.70.2 /gnu/store/y4ak268dcdwkc6lmqfk9g1dgk= 2jr9i34-glib-2.70.2-static 7fe17ca13b90>) > +``` Personally I=E2=80=99d leave =E2=80=98with-store=E2=80=99, =E2=80=98run-wit= h-store=E2=80=99, and =E2=80=98lower-object=E2=80=99 for a subsequent post, to avoid muddying the waters. In this one I=E2=80= =99d just use =E2=80=9C,lower=E2=80=9D and =E2=80=9C,build=E2=80=9D, which is en= ough to peek at derivations (we discussed it earlier on IRC and ISTR you were not quite convinced though :-)). > +Derivations are one of Guix's most important concepts, but are fairly ea= sy to Maybe: [Derivations](https://guix.gnu.org/manual/devel/en/html_node/Derivat= ions.html) > +4. `derivation-system`, specifying the Nix system a derivation will be c= ompiled > + for s/Nix system(.*)/system type\1=E2=80=94e.g., `"x86_64-linux"`/ This is great, thanks a lot for your work! Ludo=E2=80=99.