[Top][All Lists]

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

Re: All source code for GuixSD system

From: Ludovic Courtès
Subject: Re: All source code for GuixSD system
Date: Tue, 16 May 2017 23:03:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hi Tiberiu,

Tiberiu <address@hidden> skribis:

> On 16.05.2017 22:46, Ludovic Courtès wrote:
>> Currently there’s no tool to do that for GuixSD proper, though in
>> practice the command above should get you close to that.  It would be
>> interesting to develop something like a “guix system sources” command.
> How many binaries are there in GuixSD proper and how would you suggest
> we get their sources manually? I imagine some of them also have some
> patches applied, so looking on the web for the sources with the exact
> same version probably won't cut it.
> How is GuixSD proper built? Maybe we can take a look at what sources you
> use for compiling the base system and get those sources (with any
> patches that need to be applied as well).

If you run:

  guix gc -R $(readlink -f /run/current-system)

on a GuixSD system, that’ll list all the “things” the system itself
references.  Some of these things are configuration files, but many
others are the actual packages.

A rough approach would be to run something along these lines:

  guix build --sources=transitive \
    $(guix gc -R $(readlink -f /run/current-system) | \
      grep -e '-[0-9.]\+$' | \
      sed -'es,/gnu/store/.\{32\}-\(.*\)-\([0-9.]\+\)$,address@hidden,g')

It requires a bit more work, but if everything goes well, this would add
all the source of the packages the system depends on to /gnu/store.

At that point, the user can just run:

  guix build -S PACKAGE

which will return the /gnu/store file name of the source for PACKAGE
without having to download it.


reply via email to

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