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 ms1.migadu.com with LMTPS id oHiYA2h9GWbn5AAA62LTzQ:P1 (envelope-from ) for ; Fri, 12 Apr 2024 20:28:56 +0200 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 oHiYA2h9GWbn5AAA62LTzQ (envelope-from ) for ; Fri, 12 Apr 2024 20:28:56 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=IUhv1iYV; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712946535; 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: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=9uzjQ6MG8pg1GUtJm4C0LAXsoyw6DTlKxYTMcNXMLT8=; b=fGG4OmQExDAbTgPNyw46b41UZ1RCf8uzcGJAiBgEnJCx+qFhYxfpTxqhvo4zl0qDPX3Scl EYKfWn3gq/oL4P5Cc+wg/geUmBaLQZQBKtLrhObaNiaWUE8RnBiArSBTgnbPWnPUctJWbl nfjRZM/fR0KI1Sn5Yod4ZKZZN+EyAnug2FLdXgfXXvw5uNdu2IXfSBMKHkOKMqMJdiIfwl DAvdvuSCPBFn6xovifNjywlicTQnfdEXmVdFFKsB6QyLL8X6kbWeR2pt6Qp5ShEFpJb4Cs FNNs8tTY/5nAEb1xQoL2LCMJgJ7F//9m46NlOEP7uT061I9IULW8Tead9oiDkw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712946535; a=rsa-sha256; cv=none; b=aPkIooB+dDiAsvsNG/OtRCgvzqnb6hknOv01DD4r7XB7FTPBfL+9dySvxpLPnU+crLTsVW yjzEQBnDLWk6aiuTZ3Fe5ZjcoakDziq8uHH1+axYp7D1rVyvRa3243pD+AVdiP5n5rgKJZ rNRsds9BwdjQ80LZ+iTevj1FXQXqEMD4fq/f4Ko4vGSAe+HRoYkjxNNtEZgMwx/D1GKkHZ dZS6dL/dt7DQGRyqbU+dqyfJG/1pGKdcK3byQScaAVwKdom2OTl8FC7CXxBs2B9qGYtIn0 28fq+mwDUIRVoaDUJ4GAD6Py3cD780D3lOJ7WempJSLAcMYqQgj0vPJR3BKohA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=IUhv1iYV; 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=gmail.com 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 E3BB865191 for ; Fri, 12 Apr 2024 20:28:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rvLdO-0001wd-TY; Fri, 12 Apr 2024 14:28:22 -0400 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 1rvLdL-0001w2-3u for guix-devel@gnu.org; Fri, 12 Apr 2024 14:28:19 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rvLdI-00066q-9n for guix-devel@gnu.org; Fri, 12 Apr 2024 14:28:18 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-346407b8c9aso556147f8f.0 for ; Fri, 12 Apr 2024 11:28:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712946494; x=1713551294; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=9uzjQ6MG8pg1GUtJm4C0LAXsoyw6DTlKxYTMcNXMLT8=; b=IUhv1iYVcgsW4vx0uY7tjBY+t24fyxGqcCbjUCoXe60afA5nv88NIZQ+McStZYiO1M HA1MzpnIlW0vPAjRVCtd9DfxWRMttZEwpfe04UtAcu/K3004mZUAmzkLZW7a/iU82+bT +8QV5IyemOcGWGWADUTMmGYfLkPkg6YdFlwk2lJNHri5cheEjTo1ULZSh2xhwTJLzEHt vS/aJ3ZyJMmv2WxBDHsjYDYEF+NRooSRRWHC4WkBpSKjq2PhTjS6AL0TR0mbqksZQeRP vL0eygrSq9ghY1sr4qd0TP+TSMT7D5WPPbBLOUZ/5HY2A8H4IpTOt7fr8GRQ/X9D5N7r jZ6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712946494; x=1713551294; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9uzjQ6MG8pg1GUtJm4C0LAXsoyw6DTlKxYTMcNXMLT8=; b=r7KQZWrsJsjq0RfZWLacETuNeLuywl/54lEUeWjeVm+rQAYHiwBqD0f8ozAV8yueLX bnf4lCl6WGAgpip4MSwu3dHwpjSzC2hYXAxVvoGDtJ51naHSzofRLfZwQNh0aEoxjH3I VZ9KsmnRtET58D6noLET+H507MeZ8PVwwQqMlouMOM2WcA7hIQI4ZjIaqyF4NEQsq84u S15BAZOSGqx9JipYi/qTL9UUtxCTljNDuCV9uQgkNsvn9xs/xKF/IvyglizmxLZazFt1 AcDXi1AoC4pA3NSzgx6pxwVCwE2hDp2WZJJFHRxZ9MC7JfdtadBBfjKJmMima2vm7whw PfZQ== X-Gm-Message-State: AOJu0YzgQlRaaulrMVlXn2qox5egQUgKSx7XSKnJV/PZpOL3owCACJyv SlQXDfTp5awABJQcFkQQgCF3oczjnaLanT8SXzuzwfWrjLCLIml8o1H50Q== X-Google-Smtp-Source: AGHT+IG3bp0C7qC4shRL2b2FuC7J26OcpY1ZUDqhit0q6wrlF8N0MOgLK0//tH75Z2yyQy/qxANqEg== X-Received: by 2002:a05:6000:10e:b0:343:c3b0:ee39 with SMTP id o14-20020a056000010e00b00343c3b0ee39mr2119373wrx.5.1712946494014; Fri, 12 Apr 2024 11:28:14 -0700 (PDT) Received: from lili (roam-nat-fw-prg-194-254-61-42.net.univ-paris-diderot.fr. [194.254.61.42]) by smtp.gmail.com with ESMTPSA id w7-20020a5d6807000000b0034354a99d43sm4793273wru.43.2024.04.12.11.28.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 11:28:13 -0700 (PDT) From: Simon Tournier To: Guix Devel Subject: Guix extension to display derivation (and rewrite fixed-output) Date: Fri, 12 Apr 2024 20:28:11 +0200 Message-ID: <87ttk6phac.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::434; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 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, PDS_BTC_ID=0.498, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.68 X-Spam-Score: -9.68 X-Migadu-Queue-Id: E3BB865191 X-Migadu-Scanner: mx12.migadu.com X-TUID: 6WusE4efIJHY Hi, As an Emacs user, exploring Derivation (the .drv files) is easy since there is an Emacs mode. However, I have been annoyed with some pipe through =E2=80=99sed=E2=80=99 and friends. Therefore, I wrote a very simple Guix extension [1] that outputs derivation content using recutils format. --8<---------------cut here---------------start------------->8--- $ guix drv-show $(guix build hello -d) name: /gnu/store/qr00sgbh3vwwqswmgjjymg6wkys9r4i2-hello-2.12.1.drv outputs: + /gnu/store/6fbh8phmp3izay6c0dpggpxhcjn4xlm5-hello-2.12.1 [out] inputs: + /gnu/store/3ds56xg6njpw6hnp2w4xpx4psw5mka5q-glibc-2.35.drv = [out] + /gnu/store/3zh2qpi897s2x229s93iakji86b08a20-hello-2.12.1.drv = [out] + /gnu/store/5bqhdbbl71r9r936w6w8zzqlk41md3wx-glibc-2.35.drv = [out] + /gnu/store/67nh3fzviy3q4s8ar8cg0dzhyzgwrwdd-module-import-compiled.drv = [out] + /gnu/store/7fsz44vifdc0ws0amnpwnmig3ra6hb53-gcc-11.3.0.drv = [lib] + /gnu/store/fchdaawcrxb35llbl7fj7lcsq5asmk4b-guile-2.0.14.drv = [out] + /gnu/store/ky030dkfkfr3l8xgdbv45j6bs87988lx-gcc-11.3.0.drv = [lib] + /gnu/store/n9kblf5cx4lphrydjr90sp3zfvcdr1pb-glibc-utf8-locales-2.35.drv = [out] system: x86_64-linux builder: + /gnu/store/4p1l5bdxxbyyqc3wh0d07jv9rp1pdcy7-guile-2.0.14/bin/guile + --no-auto-compile + -L /gnu/store/a6acf6dds8s9fw7dp5div03rwik0x4x2-module-import + -C /gnu/store/yk897hj2p5mdx6hw47s90n8x9pn6s36c-module-import-compiled + /gnu/store/fiy8arwqm8vwaqs4h8b361kbmjmd1yra-hello-2.12.1-builder environment: + allowSubstitutes: 0 + guix properties: ((type . graft) (graft (count . 2))) + out: /gnu/store/6fbh8phmp3izay6c0dpggpxhcjn4xlm5-hello-2.12.1 + preferLocalBuild: 1 --8<---------------cut here---------------end--------------->8--- Do you think it would be useful to package it? Or maybe to include it as another subcommand (or part of some subcommand)? Let me know. :-) My motivation to do it now is this story: https://simon.tournier.info/posts/2024-04-11-rewrite-drv.html Cheers, simon 1: https://gitlab.com/zimoun/guix-drv