[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Guix extension to display derivation (and rewrite fixed-output)
From: |
Simon Tournier |
Subject: |
Guix extension to display derivation (and rewrite fixed-output) |
Date: |
Fri, 12 Apr 2024 20:28:11 +0200 |
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
- Guix extension to display derivation (and rewrite fixed-output),
Simon Tournier <=