From: Simon Tournier <zimon.toutoune@gmail.com>
To: Guix Devel <guix-devel@gnu.org>
Subject: Guix extension to display derivation (and rewrite fixed-output)
Date: Fri, 12 Apr 2024 20:28:11 +0200 [thread overview]
Message-ID: <87ttk6phac.fsf@gmail.com> (raw)
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 ’sed’ 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
next reply other threads:[~2024-04-12 18:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 18:28 Simon Tournier [this message]
2024-04-13 0:04 ` Guix extension to display derivation (and rewrite fixed-output) Leo Famulari
2024-04-13 10:32 ` Adding plumbing subcommand 'derivation'? Simon Tournier
2024-04-15 18:54 ` Leo Famulari
2024-04-18 8:40 ` Ricardo Wurmus
2024-04-18 12:57 ` Christina O'Donnell
2024-04-18 13:28 ` Christina O'Donnell
2024-04-19 14:02 ` Ludovic Courtès
2024-04-22 0:11 ` Simon Tournier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ttk6phac.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).