[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A question about manifest for my profile
From: |
hub . lombard |
Subject: |
A question about manifest for my profile |
Date: |
Tue, 16 Jul 2019 17:16:08 +0200 (CEST) |
Hi Guix!
I generated a 'manifest-to-manifest.scm' manifest of all the packages installed
in my user profile, using this Guile script (I can not find the address anymore)
----------------------------------------------------------------------------------------------------
;; Run with:
;; guile -s FILE ~/.guix-profile
(use-modules (guix profiles)
(ice-9 match)
(ice-9 pretty-print))
(define (guix-manifest where)
(sort (map (lambda (entry)
(let ((out (manifest-entry-output entry)))
(if (string= out "out")
(manifest-entry-name entry)
(format #f "~a:~a"
(manifest-entry-name entry)
(manifest-entry-output entry)))))
(manifest-entries (profile-manifest where)))
string<?))
;; Thanks to Ivan Vilata-i-Balaguer for this:
(define (guix-commit)
(let ((guix-manifest (profile-manifest (string-append (getenv "HOME")
"/.config/guix/current"))))
(match (assq 'source (manifest-entry-properties (car (manifest-entries
guix-manifest))))
(('source ('repository ('version 0) _ _
('commit commit) _ ...))
commit)
(_ #f))))
(match (command-line)
((_ where)
(format #t ";; commit: ~a\n" (guix-commit))
(pretty-print
`(specifications->manifest
',(guix-manifest where))))
(_ (error "Please provide the path to a Guix profile.")))
----------------------------------------------------------------------------------------------------
Then I called it:
hubert@gnu ~$ guile -s manifest-to-manifest.scm ~/.guix-profile
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /home/hubert/manifest-to-manifest.scm
;;; compiled
/home/hubert/.cache/guile/ccache/2.2-LE-8-3.A/home/hubert/manifest-to-manifest.scm.go
;; commit: 6c83c48391ebc2b08ca4704c437de4f1e59fca9a
(specifications->manifest
'("brasero"
"ffmpeg"
"gimp"
"gnumeric"
"inkscape"
"lynx"
"markdown"
"mpv"
"obs"
"qemu"
"quassel"
"racket"
"sbcl-next"
"ungoogled-chromium"
"wget"
"youtube-dl"
"youtube-viewer"))
hubert@gnu ~$
Then I made the updates, reconfigured /etc/config.scm and restarted.
I think the launch of the script was more or less equivalent to the following
command:
$ guix package --manifest=manifest-to-manifest.scm
In which case, I will not need to run this command?
And finally, are there any changes to make in '/etc/config.scm'? Maybe add to
it:
-----------------------------------------------
(specifications->manifest
'("brasero"
"ffmpeg"
"gimp"
"gnumeric"
"inkscape"
"lynx"
"markdown"
"mpv"
"obs"
"qemu"
"quassel"
"racket"
"ungoogled-chromium"
"wget"
"youtube-dl"
"youtube-viewer"))
-----------------------------------------------
Thank you in advance for your possible clarification :-)
Hubert
- A question about manifest for my profile,
hub . lombard <=