* 🌎️ Install every Guix package 🌎️
@ 2023-01-04 2:33 jgart
2023-01-04 3:09 ` Install every Guix package Nguyễn Gia Phong
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: jgart @ 2023-01-04 2:33 UTC (permalink / raw)
To: guix-devel
Hi Guixers,
How would you approach writing a script that installs every Guix package exhaustively for your current revision?
I'm thinking of something similar to `all-packages` on PyPi but for every Guix package (the whole wide 🌎️).
https://pypi.org/project/all-packages/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Install every Guix package
2023-01-04 2:33 🌎️ Install every Guix package 🌎️ jgart
@ 2023-01-04 3:09 ` Nguyễn Gia Phong
2023-01-04 5:39 ` 🌎️ Install every Guix package 🌎️ kiasoc5
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Nguyễn Gia Phong @ 2023-01-04 3:09 UTC (permalink / raw)
To: jgart, guix-devel
On 2023-01-04 at 02:33+00:00, jgart wrote:
> How would you approach writing a script that installs
> every Guix package exhaustively for your current revision?
I don't want to know why you'd like to do that,
but you can start from here:
repo=https://data.guix.gnu.org/repository/1/branch/master
path=latest-processed-revision/packages.json
guix shell curl -- curl $repo/$path?all_results=on |
guix shell jq -- jq -r '.packages[] | .name' |
guix shell findutils -- xargs guix shell
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 🌎️ Install every Guix package 🌎️
2023-01-04 2:33 🌎️ Install every Guix package 🌎️ jgart
2023-01-04 3:09 ` Install every Guix package Nguyễn Gia Phong
@ 2023-01-04 5:39 ` kiasoc5
2023-01-04 15:52 ` Eric Brown
2023-01-05 2:04 ` 宋文武
2023-01-05 2:50 ` Eric Brown
3 siblings, 1 reply; 8+ messages in thread
From: kiasoc5 @ 2023-01-04 5:39 UTC (permalink / raw)
To: jgart, guix-devel
On 1/3/23 21:33, jgart wrote:
> Hi Guixers,
>
> How would you approach writing a script that installs every Guix package exhaustively for your current revision?
>
> I'm thinking of something similar to `all-packages` on PyPi but for every Guix package (the whole wide 🌎️).
>
> https://pypi.org/project/all-packages/
>
Perhaps you are inspired by this?
https://a.exozy.me/posts/installing-every-arch-package/
I'd run the list of all packages by guix size before attempting such
shenanigans (untested):
```
$ guix package -A | cut -f 1 | sort -u | xargs guix size
```
Surely if there are outstanding questions that could be answered by
installing all packages, they could be answered in another way?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 🌎️ Install every Guix package 🌎️
2023-01-04 5:39 ` 🌎️ Install every Guix package 🌎️ kiasoc5
@ 2023-01-04 15:52 ` Eric Brown
0 siblings, 0 replies; 8+ messages in thread
From: Eric Brown @ 2023-01-04 15:52 UTC (permalink / raw)
To: kiasoc5; +Cc: jgart, guix-devel
kiasoc5 <kiasoc5@disroot.org> writes:
> Surely if there are outstanding questions that could be answered by installing
> all packages, they could be answered in another way?
I do this to keep packages as reasonably close to "locked and loaded" as
possible (including all external channels) so that when I need them
interactively, they are ready on my system.
It's easier and less trouble than Cuirass, in my view.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 🌎️ Install every Guix package 🌎️
2023-01-04 2:33 🌎️ Install every Guix package 🌎️ jgart
2023-01-04 3:09 ` Install every Guix package Nguyễn Gia Phong
2023-01-04 5:39 ` 🌎️ Install every Guix package 🌎️ kiasoc5
@ 2023-01-05 2:04 ` 宋文武
2023-01-05 2:50 ` Eric Brown
3 siblings, 0 replies; 8+ messages in thread
From: 宋文武 @ 2023-01-05 2:04 UTC (permalink / raw)
To: jgart; +Cc: guix-devel
"jgart" <jgart@dismail.de> writes:
> Hi Guixers,
>
> How would you approach writing a script that installs every Guix package exhaustively for your current revision?
>
> I'm thinking of something similar to `all-packages` on PyPi but for every Guix package (the whole wide 🌎️).
>
> https://pypi.org/project/all-packages/
Maybe guix package -m manifest.scm:
--8<---------------cut here---------------start------------->8---
(use-modules
(srfi srfi-1)
(ice-9 match)
(gnu packages)
(guix packages))
;;; copied from guix/scripts/weather.scm.
(define (all-packages)
"Return the list of public packages we are going to query."
(delete-duplicates
(fold-packages (lambda (package result)
(match (package-replacement package)
((? package? replacement)
(cons* replacement package result))
(#f
(cons package result))))
'()
;; Dismiss deprecated packages but keep hidden packages.
#:select? (negate package-superseded))
eq?))
(packages->manifest (all-packages))
--8<---------------cut here---------------end--------------->8---
No idea how long it will be :)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 🌎️ Install every Guix package 🌎️
2023-01-04 2:33 🌎️ Install every Guix package 🌎️ jgart
` (2 preceding siblings ...)
2023-01-05 2:04 ` 宋文武
@ 2023-01-05 2:50 ` Eric Brown
2023-01-05 18:48 ` kiasoc5
3 siblings, 1 reply; 8+ messages in thread
From: Eric Brown @ 2023-01-05 2:50 UTC (permalink / raw)
To: jgart; +Cc: guix-devel
"jgart" <jgart@dismail.de> writes:
> Hi Guixers,
>
> How would you approach writing a script that installs every Guix package exhaustively for your current revision?
>
> I'm thinking of something similar to `all-packages` on PyPi but for every Guix package (the whole wide 🌎️).
>
> https://pypi.org/project/all-packages/
guix package -A | cut -f 1 | sort -u | xargs guix build --keep-going
can accomplish this. The `--keep-going' flag is useful in case a package
does not build.
Occasionally, I will sandwich in a negated grep to
exclude packages:
guix package -A | cut -f 1 | sort -u | grep -v "emacs-guile" | xargs guix build --keep-going
(Aside: emacs-guile-on-guix-system is the pinnacle of GNU, IMO but it failed to
build--appearing to be abandoned--and was removed.)
One may also select just the packages they want, perhaps by using a
scripting language such as python to make larger selections more
convenient.
This can be combined with a substitute server and an offload build
machine to make an on-site cache. One can choose whether to employ the
Guix substitute servers if that would be beneficial.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 🌎️ Install every Guix package 🌎️
2023-01-05 2:50 ` Eric Brown
@ 2023-01-05 18:48 ` kiasoc5
2023-01-05 19:01 ` Eric Brown
0 siblings, 1 reply; 8+ messages in thread
From: kiasoc5 @ 2023-01-05 18:48 UTC (permalink / raw)
To: Eric Brown; +Cc: jgart, guix-devel
On 1/4/23 21:50, Eric Brown wrote:
> "jgart" <jgart@dismail.de> writes:
>
>> Hi Guixers,
>>
>> How would you approach writing a script that installs every Guix package exhaustively for your current revision?
>>
>> I'm thinking of something similar to `all-packages` on PyPi but for every Guix package (the whole wide 🌎️).
>>
>> https://pypi.org/project/all-packages/
>
> guix package -A | cut -f 1 | sort -u | xargs guix build --keep-going
>
> can accomplish this. The `--keep-going' flag is useful in case a package
> does not build.
>
> Occasionally, I will sandwich in a negated grep to
> exclude packages:
>
> guix package -A | cut -f 1 | sort -u | grep -v "emacs-guile" | xargs guix build --keep-going
>
> (Aside: emacs-guile-on-guix-system is the pinnacle of GNU, IMO but it failed to
> build--appearing to be abandoned--and was removed.)
>
> One may also select just the packages they want, perhaps by using a
> scripting language such as python to make larger selections more
> convenient.
>
> This can be combined with a substitute server and an offload build
> machine to make an on-site cache. One can choose whether to employ the
> Guix substitute servers if that would be beneficial.
>
I just realized that this downloads all packages into the store, which
not the same as installing all the packages into one or many profiles. I
wonder what the minimum set of profiles to install all packages while
avoiding collisions might be?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 🌎️ Install every Guix package 🌎️
2023-01-05 18:48 ` kiasoc5
@ 2023-01-05 19:01 ` Eric Brown
0 siblings, 0 replies; 8+ messages in thread
From: Eric Brown @ 2023-01-05 19:01 UTC (permalink / raw)
To: kiasoc5; +Cc: Eric Brown, jgart, guix-devel
kiasoc5 <kiasoc5@disroot.org> writes:
> I just realized that this downloads all packages into the store, which not the
> same as installing all the packages into one or many profiles. I wonder what the
> minimum set of profiles to install all packages while avoiding collisions might
> be?
Correct, my reply was about building everything rather than installing
everything.
But--as a case merely to prove a point--if you include the kernel in the required set
of packages, then the single set of non-colliding packages can not be
defined because there are several mutually-exclusive kernels.
A valid "maximum coverage" set must have some additional constraints.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-01-05 19:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04 2:33 🌎️ Install every Guix package 🌎️ jgart
2023-01-04 3:09 ` Install every Guix package Nguyễn Gia Phong
2023-01-04 5:39 ` 🌎️ Install every Guix package 🌎️ kiasoc5
2023-01-04 15:52 ` Eric Brown
2023-01-05 2:04 ` 宋文武
2023-01-05 2:50 ` Eric Brown
2023-01-05 18:48 ` kiasoc5
2023-01-05 19:01 ` Eric Brown
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).