2007-10-05 07:25:13 +00:00
|
|
|
args:
|
|
|
|
with args;
|
|
|
|
stdenv.mkDerivation
|
|
|
|
{
|
|
|
|
name="X11-fonts";
|
|
|
|
phases="installPhase";
|
|
|
|
fontDirs = import ./fonts.nix {inherit pkgs config;};
|
2007-10-05 07:45:56 +00:00
|
|
|
installCommand = "
|
2007-10-05 07:25:13 +00:00
|
|
|
mkdir -p \$out/share/X11-fonts/;
|
|
|
|
for i in \$fontDirs; do
|
|
|
|
if ! echo \$i | egrep '~|/nix/var/nix/profiles' &>/dev/null; then
|
|
|
|
j=\${i#/nix/store/}
|
|
|
|
j=\${j%%/*}
|
2007-10-05 07:45:56 +00:00
|
|
|
if ! test -e \$out/share/X11-fonts/\${j}; then
|
2007-10-05 07:25:13 +00:00
|
|
|
ln -s \$i \$out/share/X11-fonts/\${j};
|
|
|
|
fi;
|
|
|
|
fi;
|
|
|
|
done;
|
|
|
|
";
|
|
|
|
}
|