@@ -1,42 +1,70 @@
11{stdenv, fetchurl, fontforge, pythonPackages, python}:
22
3−stdenv.mkDerivation rec {
4− name = "liberation-fonts-2.00.1";
3+let
4+ common =
5+ {version, url, sha256, buildInputs}:
6+ stdenv.mkDerivation rec {
7+ name = "liberation-fonts-${version}";
8+ src = fetchurl {
9+ inherit url sha256;
10+ };
511
6− src = fetchurl {
7− url = "https://fedorahosted.org/releases/l/i/liberation-fonts/${name}.tar.gz";
12+ inherit buildInputs;
13+
14+ installPhase = ''
15+ mkdir -p $out/share/fonts/truetype
16+ cp -v $( find . -name '*.ttf') $out/share/fonts/truetype
17+
18+ mkdir -p "$out/doc/${name}"
19+ cp -v AUTHORS ChangeLog COPYING License.txt README "$out/doc/${name}" || true
20+ '';
21+
22+ meta = with stdenv.lib; {
23+ description = "Liberation Fonts, replacements for Times New Roman, Arial, and Courier New";
24+ longDescription = ''
25+ The Liberation Fonts are intended to be replacements for the three most
26+ commonly used fonts on Microsoft systems: Times New Roman, Arial, and
27+ Courier New. Since 2012 they are based on croscore fonts.
28+
29+ There are three sets: Sans (a substitute for Arial, Albany, Helvetica,
30+ Nimbus Sans L, and Bitstream Vera Sans), Serif (a substitute for Times
31+ New Roman, Thorndale, Nimbus Roman, and Bitstream Vera Serif) and Mono
32+ (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L, and
33+ Bitstream Vera Sans Mono).
34+ '';
35+
36+ license = licenses.ofl;
37+ homepage = https://fedorahosted.org/liberation-fonts/;
38+ maintainers = [
39+ maintainers.raskin
40+ ];
41+ platforms = platforms.unix;
42+ };
43+ };
44+
45+in {
46+ liberation_ttf_v1_from_source = common rec {
47+ version = "1.07.4";
48+ url = "https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-${version}.tar.gz";
49+ sha256 = "01jlg88q2s6by7qv6fmnrlx0lwjarrjrpxv811zjz6f2im4vg65d";
50+ buildInputs = [ fontforge pythonPackages.fonttools python ];
51+ };
52+ liberation_ttf_v1_binary = common rec {
53+ version = "1.07.4";
54+ url = "https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-${version}.tar.gz";
55+ sha256 = "0p7frz29pmjlk2d0j2zs5kfspygwdnpzxkb2hwzcfhrafjvf59v1";
56+ buildInputs = [ ];
57+ };
58+ liberation_ttf_v2_from_source = common rec {
59+ version = "2.00.1";
60+ url = "https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-${version}.tar.gz";
861 sha256 = "1ymryvd2nw4jmw4w5y1i3ll2dn48rpkqzlsgv7994lk6qc9cdjvs";
62+ buildInputs = [ fontforge pythonPackages.fonttools python ];
963 };
10−
11− buildInputs = [ fontforge pythonPackages.fonttools python ];
12−
13− installPhase = ''
14− mkdir -p $out/share/fonts/truetype
15− cp -v $(find . -name '*.ttf') $out/share/fonts/truetype
16−
17− mkdir -p "$out/doc/${name}"
18− cp -v AUTHORS ChangeLog COPYING License.txt README "$out/doc/${name}" || true
19− '';
20−
21− meta = with stdenv.lib; {
22− description = "Liberation Fonts, replacements for Times New Roman, Arial, and Courier New";
23− longDescription = ''
24− The Liberation Fonts are intended to be replacements for the three most
25− commonly used fonts on Microsoft systems: Times New Roman, Arial, and
26− Courier New. Since 2012 they are based on croscore fonts.
27−
28− There are three sets: Sans (a substitute for Arial, Albany, Helvetica,
29− Nimbus Sans L, and Bitstream Vera Sans), Serif (a substitute for Times
30− New Roman, Thorndale, Nimbus Roman, and Bitstream Vera Serif) and Mono
31− (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L, and
32− Bitstream Vera Sans Mono).
33− '';
34−
35− license = licenses.ofl;
36− homepage = https://fedorahosted.org/liberation-fonts/;
37− maintainers = [
38− maintainers.raskin
39− ];
40− platforms = platforms.unix;
64+ liberation_ttf_v2_binary = common rec {
65+ version = "2.00.1";
66+ url = "https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-${version}.tar.gz";
67+ sha256 = "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q";
68+ buildInputs = [ ];
4169 };
42−}
70+}