guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: website: dissecting-guix-1-derivations: Tweak ", lower" example.


From: Ludovic Courtès
Subject: 02/02: website: dissecting-guix-1-derivations: Tweak ", lower" example.
Date: Wed, 4 Jan 2023 05:51:04 -0500 (EST)

civodul pushed a commit to branch master
in repository guix-artwork.

commit fea82c7974bc8a22d0dfb1aced789f1ff81c86bd
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Jan 4 11:46:56 2023 +0100

    website: dissecting-guix-1-derivations: Tweak ",lower" example.
    
    * website/posts/dissecting-guix-1-derivations.md: Tweak session example
    with ",lower".
---
 website/posts/dissecting-guix-1-derivations.md | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/website/posts/dissecting-guix-1-derivations.md 
b/website/posts/dissecting-guix-1-derivations.md
index e2e2d93..023bc97 100644
--- a/website/posts/dissecting-guix-1-derivations.md
+++ b/website/posts/dissecting-guix-1-derivations.md
@@ -183,12 +183,19 @@ With the exception of `file-name`, each of those fields 
corresponds to a field
 in the `Derive(...)` form.  Before we can examine them, though, we need to
 figure out how to _lower_ that `irssi` `<package>` object into a derivation.
 
-`guix repl` provides the `,lower` command to create derivations quickly:
-
-```scheme
-,lower irssi
-(pk $1) ;use the $N variable automatically bound by the REPL
-;;; (#<derivation /gnu/store/drjfddvlblpr635jazrg9kn5azd9hsbj-irssi-1.4.3.drv 
=> /gnu/store/v5pd69j3hjs1fck4b5p9hd91wc8yf5qx-irssi-1.4.3 7f3bff4a6370>)
+`guix repl` provides the `,lower` command to create derivations quickly,
+as shown in this sample REPL session:
+
+```
+scheme@(guile-user)> ,use (guix)
+scheme@(guile-user)> ,use (gnu packages irc)
+scheme@(guile-user)> irssi
+$1 = #<package irssi@1.4.3 gnu/packages/irc.scm:153 7f3ff98e0c60>
+scheme@(guile-user)> ,lower irssi
+$2 = #<derivation /gnu/store/drjfddvlblpr635jazrg9kn5azd9hsbj-irssi-1.4.3.drv 
=> /gnu/store/v5pd69j3hjs1fck4b5p9hd91wc8yf5qx-irssi-1.4.3 7f3ff7782d70>
+;; Below we use the $N variable automatically bound by the REPL.
+scheme@(guile-user)> (derivation-system $2)
+$3 = "x86_64-linux"
 ```
 
 Since `,lower` is a REPL command, however, we can't use it in proper Scheme



reply via email to

[Prev in Thread] Current Thread [Next in Thread]