[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: |
Fri, 19 May 2017 17:39:32 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hello Dima,
(+Cc: help-guix)
Dima Ursu <address@hidden> skribis:
> On 05/17/2017 12:03 AM, Ludovic Courtès wrote:
[...]
>> 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.
>
> Thanks, Ludo, that's what I was looking for!
>
>> 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')
>
> I've run this in several stages, and it seems that grep -e '-[0-9.]\+$'
> is a bit too aggressive - some packages that I think are valid are
> excluded, like:
> tz-data
> mutter
> libjpeg-9b
> libcdio-paranoia
> xf86-video-intel
>
> They either have some letters at the end, or not have a version at all.
> I wonder if the "--sources=transitive" would take care of them and pull
> them anyway, but there's no obvious way to be sure of that.
Yeah, I guess you could fine-tune the regexp as a first step.
> There are some .scm files, which I assume are already in the source
> version, but correct me if I'm wrong.
Yes, these are just copied from Guix proper to /gnu/store.
> Some of the reported packages confuse me, like boot, fstab, profile,
> raw-initrd, system - and they won't even build - guix just reports them
> as "unknown package". Should I bother at all with them?
These are non-package byproducts used by the system (everything ‘guix
system’ and other tools build goes to /gnu/store, including
configuration files, the initrd, and so on.) It’s safe to ignore them.
HTH,
Ludo’.