guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] build: union: Add create-all-directory? parameter to uni


From: Danny Milosavljevic
Subject: Re: [PATCH 1/2] build: union: Add create-all-directory? parameter to union-build
Date: Mon, 27 Feb 2017 10:06:20 +0100

Hi Mark,

On Fri, 24 Feb 2017 17:13:53 -0500
Mark H Weaver <address@hidden> wrote:

> If the purpose here is to facilitate mutating anything in the store,

That's not what it does. It's used in the profile hook. 'union-build is 
basically just reused to avoid code duplication. See PATCH 2/2.

> then we cannot accept this.  

> If you want to add something to your profile, e.g. fonts.dir, then use
> profile hooks for that.  See %default-profile-hooks in
> guix/profiles.scm.  However, we already have a hook to build fonts.dir,
> so I'm not sure what's missing here.

Yeah, that is the profile hook that is modified.

The reason is that there are multiple font directories that can also be shared 
by different font packages.

Currently, the hook to build fonts.dir only does it for the "truetype" 
directory.

What the patch does is merge the font trees and then call mkfontdir for each of 
the output directories (via ftw).

The modification in 'union-build is because it handles a special case of there 
just being one input directory: then 'union-build would have symlinked the 
entire directory - which would make the output (!) immutable.

In the end 'fonts-dir-file returns a derivation that is an union of the inputs 
with those fonts.dir files added.

That said, I'm not sure whether the added complexity is worth it - but it would 
be safe and it doesn't mutate existing store items in-place. It just adds 
"fonts.dir"s to the profile for all subdirs of share/fonts . It's avoiding 
symlinks in order to be able to do that without modifying the inputs in-place.



reply via email to

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