You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.1 KiB

{ stdenv, lib, fetchurl, cabextract, pkgs }:
let
regeditfile = pkgs.writeTextFile {
name = "fonts.reg";
text =
''
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Fonts]
"Arial Bold"="Arialbd.TTF"
"Arial Bold Italic"="Arialbi.TTF"
"Arial Italic"="Ariali.TTF"
"Arial"="Arial.TTF"
"Arial Black"="AriBlk.TTF"
'';
};
in stdenv.mkDerivation rec {
name = "ariblk-font";
src = fetchurl {
url = "https://mirrors.kernel.org/gentoo/distfiles/arial32.exe";
sha256 = "85297a4d146e9c87ac6f74822734bdee5f4b2a722d7eaa584b7f2cbf76f478f6";
};
srcblk = fetchurl {
url = "https://mirrors.kernel.org/gentoo/distfiles/arialb32.exe";
sha256 = "a425f0ffb6a1a5ede5b979ed6177f4f4f4fdef6ae7c302a7b7720ef332fec0a8";
};
nativeBuildInputs = [ cabextract ];
unpackPhase = ''
cabextract ${src}
cabextract ${srcblk}
'';
installPhase = ''
mkdir -p $out/share/fonts $out/share/regs
cp *.TTF $out/share/fonts
cp ${regeditfile} $out/share/regs/fonts.reg
'';
}