blob: 3e2dc1d2c349ec8447f9c7be64821a10e7072cc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
args : with args;
let localDefs = builderDefs {
src =""; /* put a fetchurl here */
buildInputs = [mkfontdir mkfontscale ttmkfdir];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
doInstall = FullDepEntry ("
ensureDir \$out/share/fonts/
cd \$out/share/fonts
for i in ${toString paths}; do
find \$i -type f -exec ln -s '{}' . ';' ;
done
mkfontdir
mkfontscale
mv fonts.scale fonts.scale.old
mv fonts.dir fonts.dir.old
ttmkfdir
cat fonts.dir.old >> fonts.dir
cat fonts.scale.old >> fonts.scale
rm fonts.dir.old fonts.scale.old
") [minInit addInputs defEnsureDir] ;
in
stdenv.mkDerivation rec {
name = "wrapped-font-dir";
builder = writeScript (name + "-builder")
(textClosure localDefs [ doInstall doForceShare doPropagate]);
meta = {
description = "
Just a wrapper to create fonts.dir and fonts.scale .
";
inherit src;
};
}
|