mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
21 lines
452 B
Nix
21 lines
452 B
Nix
|
args:
|
||
|
with args;
|
||
|
stdenv.mkDerivation
|
||
|
{
|
||
|
name="X11-fonts";
|
||
|
phases="installPhase";
|
||
|
fontDirs = import ./fonts.nix {inherit pkgs config;};
|
||
|
installPhase = "
|
||
|
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%%/*}
|
||
|
if ! test -e \$out/share/X11-fonts/\${g}; then
|
||
|
ln -s \$i \$out/share/X11-fonts/\${j};
|
||
|
fi;
|
||
|
fi;
|
||
|
done;
|
||
|
";
|
||
|
}
|