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

4 months ago
  1. { stdenv, lib, fetchurl, cabextract, pkgs }:
  2. let
  3. regeditfile = pkgs.writeTextFile {
  4. name = "fonts.reg";
  5. text =
  6. ''
  7. REGEDIT4
  8. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Fonts]
  9. "Arial Bold"="Arialbd.TTF"
  10. "Arial Bold Italic"="Arialbi.TTF"
  11. "Arial Italic"="Ariali.TTF"
  12. "Arial"="Arial.TTF"
  13. "Arial Black"="AriBlk.TTF"
  14. '';
  15. };
  16. in stdenv.mkDerivation rec {
  17. name = "ariblk-font";
  18. src = fetchurl {
  19. url = "https://mirrors.kernel.org/gentoo/distfiles/arial32.exe";
  20. sha256 = "85297a4d146e9c87ac6f74822734bdee5f4b2a722d7eaa584b7f2cbf76f478f6";
  21. };
  22. srcblk = fetchurl {
  23. url = "https://mirrors.kernel.org/gentoo/distfiles/arialb32.exe";
  24. sha256 = "a425f0ffb6a1a5ede5b979ed6177f4f4f4fdef6ae7c302a7b7720ef332fec0a8";
  25. };
  26. nativeBuildInputs = [ cabextract ];
  27. unpackPhase = ''
  28. cabextract ${src}
  29. cabextract ${srcblk}
  30. '';
  31. installPhase = ''
  32. mkdir -p $out/share/fonts $out/share/regs
  33. cp *.TTF $out/share/fonts
  34. cp ${regeditfile} $out/share/regs/fonts.reg
  35. '';
  36. }