2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, cabextract }:
|
2007-01-22 17:39:14 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
fonts = [
|
|
|
|
{name = "andale"; sha256 = "0w7927hlwayqf3vvanf8f3qp2g1i404jzqvhp1z3mp0sjm1gw905";}
|
|
|
|
{name = "arial"; sha256 = "1xkqyivbyb3z9dcalzidf8m4npzfpls2g0kldyn8g73f2i6plac5";}
|
|
|
|
{name = "arialb"; sha256 = "1a60zqrg63kjnykh5hz7dbpzvx7lyivn3vbrp7jyv9d1nvzz09d4";}
|
|
|
|
{name = "comic"; sha256 = "0ki0rljjc1pxkbsxg515fwx15yc95bdyaksa3pjd89nyxzzg6vcw";}
|
|
|
|
{name = "courie"; sha256 = "111k3waxki9yyxpjwl2qrdkswvsd2dmvhbjmmrwyipam2s31sldv";}
|
|
|
|
{name = "georgi"; sha256 = "0083jcpd837j2c06kp1q8glfjn9k7z6vg3wi137savk0lv6psb1c";}
|
|
|
|
{name = "impact"; sha256 = "1yyc5z7zmm3s418hmrkmc8znc55afsrz5dgxblpn9n81fhxyyqb0";}
|
|
|
|
{name = "times"; sha256 = "1aq7z3l46vwgqljvq9zfgkii6aivy00z1529qbjkspggqrg5jmnv";}
|
|
|
|
{name = "trebuc"; sha256 = "1jfsgz80pvyqvpfpaiz5pd8zwlcn67rg2jgynjwf22sip2dhssas";}
|
|
|
|
{name = "webdin"; sha256 = "0nnp2znmnmx87ijq9zma0vl0hd46npx38p0cc6lgp00hpid5nnb4";}
|
|
|
|
{name = "verdan"; sha256 = "15mdbbfqbyp25a6ynik3rck3m3mg44plwrj79rwncc9nbqjn3jy1";}
|
|
|
|
{name = "wd97vwr"; sha256 = "1lmkh3zb6xv47k0z2mcwk3vk8jff9m845c9igxm14bbvs6k2c4gn";}
|
|
|
|
];
|
|
|
|
|
|
|
|
eula = fetchurl {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "http://corefonts.sourceforge.net/eula.htm";
|
2007-01-22 17:39:14 +00:00
|
|
|
sha256 = "1aqbcnl032g2hd7iy56cs022g47scb0jxxp3mm206x1yqc90vs1c";
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "corefonts-1";
|
|
|
|
|
|
|
|
exes = map ({name, sha256}: fetchurl {
|
2007-08-27 14:01:33 +01:00
|
|
|
url = "mirror://sourceforge/corefonts/${name}32.exe";
|
2007-01-22 17:39:14 +00:00
|
|
|
inherit sha256;
|
|
|
|
}) fonts;
|
|
|
|
|
2018-01-10 00:27:23 +00:00
|
|
|
nativeBuildInputs = [cabextract];
|
2007-01-22 17:39:14 +00:00
|
|
|
|
2015-03-20 23:21:35 +00:00
|
|
|
buildCommand = ''
|
2007-01-22 17:39:14 +00:00
|
|
|
for i in $exes; do
|
|
|
|
cabextract --lowercase $i
|
|
|
|
done
|
|
|
|
|
|
|
|
cabextract --lowercase viewer1.cab
|
2015-03-20 23:21:35 +00:00
|
|
|
|
2019-05-13 02:55:32 +01:00
|
|
|
install -m444 -Dt $out/share/fonts/truetype *.ttf
|
2007-01-22 17:39:14 +00:00
|
|
|
|
|
|
|
# Also put the EULA there to be on the safe side.
|
2019-05-13 02:55:32 +01:00
|
|
|
cp ${eula} $out/share/fonts/truetype/eula.html
|
2015-03-20 23:21:35 +00:00
|
|
|
|
|
|
|
# Set up no-op font configs to override any aliases set up by
|
|
|
|
# other packages.
|
|
|
|
mkdir -p $out/etc/fonts/conf.d
|
|
|
|
for name in Andale-Mono Arial-Black Arial Comic-Sans-MS \
|
|
|
|
Courier-New Georgia Impact Times-New-Roman \
|
|
|
|
Trebuchet Verdana Webdings ; do
|
|
|
|
substitute ${./no-op.conf} $out/etc/fonts/conf.d/30-''${name,,}.conf \
|
|
|
|
--subst-var-by fontname "''${name//-/ }"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2017-08-10 20:43:49 +01:00
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHashMode = "recursive";
|
2020-09-16 20:16:01 +01:00
|
|
|
outputHash = "089d2m9bvaacj36qdq77pcazji0sbbr796shic3k52cpxkjnzbwh";
|
2017-08-10 20:43:49 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://corefonts.sourceforge.net/";
|
2016-06-07 02:48:58 +01:00
|
|
|
description = "Microsoft's TrueType core fonts for the Web";
|
|
|
|
platforms = platforms.all;
|
2016-06-07 02:57:21 +01:00
|
|
|
license = licenses.unfreeRedistributable;
|
2015-03-20 23:21:35 +00:00
|
|
|
# Set a non-zero priority to allow easy overriding of the
|
|
|
|
# fontconfig configuration files.
|
|
|
|
priority = 5;
|
|
|
|
};
|
2007-01-22 17:39:14 +00:00
|
|
|
}
|