flake-fonts/collection.nix

19 lines
445 B
Nix

# vim: set noet sw=2 ts=2 sts=2:
{lib, pkgs, fonts, ...}:
with pkgs;
stdenv.mkDerivation {
name = "fonts-collection";
nativeBuildInputs = [ coreutils ];
srcs = builtins.attrValues fonts.all;
unpackPhase = " ";
installPhase = ''
mkdir -p "$out/share/"{fonts,doc}
for src in $srcs
do
cd $src
find * -type d -exec mkdir -p "$out/{}" \;
find * -not -type d -exec ln -s "$src/{}" "$out/{}" \;
done
'';
}