From: Ricardo Wurmus <rekado@elephly.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: What’s the weather like?
Date: Sun, 23 Jul 2017 12:26:16 +0200 [thread overview]
Message-ID: <87inij8n5j.fsf@elephly.net> (raw)
In-Reply-To: <87mv7v8tzs.fsf@elephly.net>
Ricardo Wurmus <rekado@elephly.net> writes:
> Now if one could pass a manifest or a system configuration to “guix
> weather” and it would show how many of the desired packages have
> substitutes that would be even more useful. Looking at the concise code
> it seems to be an almost trivial change.
Attached is a patch against “weather.scm” that adds a “--manifest”
option. I used it with my profile’s manifest and got this result:
https://hydra.gnu.org
98.5% substitutes available (263 out of 267)
1,063.4 MiB of nars (compressed)
2,903.9 MiB on disk (uncompressed)
0.275 seconds per request (73.3 seconds in total)
3.6 requests per second
Yay!
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
--- guix/scripts/weather.scm 2017-07-23 12:24:42.094607359 +0200
+++ guix/scripts/weather.scm.more 2017-07-23 12:25:38.284361726 +0200
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,6 +21,7 @@
#:use-module (guix ui)
#:use-module (guix scripts)
#:use-module (guix packages)
+ #:use-module (guix profiles)
#:use-module (guix derivations)
#:use-module (guix monads)
#:use-module (guix store)
@@ -168,6 +170,9 @@
(string-tokenize arg)
(alist-delete 'substitute-urls result))
rest)))
+ (option '(#\m "manifest") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'manifest arg result)))
(option '(#\s "system") #t #f
(lambda (opt name arg result)
(alist-cons 'system arg result)))))
@@ -191,7 +196,13 @@
opts)
(() (list (%current-system)))
(systems systems)))
- (packages (all-packages))
+ (packages (let ((manifest-file (assoc-ref opts 'manifest)))
+ (if (and manifest-file (file-exists? manifest-file))
+ (let* ((user-module (make-user-module '((guix profiles) (gnu))))
+ (manifest (load* manifest-file user-module)))
+ (map manifest-entry-item
+ (manifest-transitive-entries manifest)))
+ (all-packages))))
(items (with-store store
(parameterize ((%graft? #f))
(concatenate
next prev parent reply other threads:[~2017-07-23 10:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-21 15:13 What’s the weather like? Ludovic Courtès
2017-07-23 7:25 ` Catonano
2017-07-24 9:07 ` Ludovic Courtès
2017-07-24 11:17 ` Vincent Legoll
2017-07-24 13:15 ` Ludovic Courtès
2017-07-24 14:48 ` Vincent Legoll
2017-07-23 7:58 ` Ricardo Wurmus
2017-07-23 10:26 ` Ricardo Wurmus [this message]
2017-07-23 11:02 ` Ricardo Wurmus
2017-07-25 10:26 ` Ludovic Courtès
2017-07-26 20:22 ` Alex Kost
2017-07-27 9:06 ` Ludovic Courtès
2017-07-27 11:39 ` Ricardo Wurmus
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=87inij8n5j.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=guix-devel@gnu.org \
--cc=ludo@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).