@@ -4,23 +4,27 @@ let
44 inherit (python2.pkgs) fonttools;
55
66 common =
7− {version, url, sha256, buildInputs}:
7+ {version, url, sha256, buildInputs, postPatch ? null, outputHash}:
88 stdenv.mkDerivation rec {
99 name = "liberation-fonts-${version}";
1010 src = fetchurl {
1111 inherit url sha256;
1212 };
1313
14− inherit buildInputs;
14+ inherit buildInputs postPatch;
1515
1616 installPhase = ''
1717 mkdir -p $out/share/fonts/truetype
1818 cp -v $( find . -name '*.ttf') $out/share/fonts/truetype
1919
20− mkdir -p "$out/doc/${name}"
21− cp -v AUTHORS ChangeLog COPYING License.txt README "$out/doc/${name}" || true
20+ mkdir -p "$out/share/doc/${name}"
21+ cp -v AUTHORS ChangeLog COPYING License.txt README "$out/share/doc/${name}" || true
2222 '';
2323
24+ outputHashAlgo = "sha256";
25+ outputHashMode = "recursive";
26+ inherit outputHash;
27+
2428 meta = with stdenv.lib; {
2529 description = "Liberation Fonts, replacements for Times New Roman, Arial, and Courier New";
2630 longDescription = ''
@@ -36,7 +40,7 @@ let
3640 '';
3741
3842 license = licenses.ofl;
39− homepage = https://fedorahosted.org/liberation-fonts/;
43+ homepage = https://pagure.io/liberation-fonts/;
4044 maintainers = [
4145 maintainers.raskin
4246 ];
@@ -47,26 +51,35 @@ let
4751in {
4852 liberation_ttf_v1_from_source = common rec {
4953 version = "1.07.4";
50− url = "https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-${version}.tar.gz";
54+ url = "https://releases.pagure.org/liberation-fonts/liberation-fonts-${version}.tar.gz";
5155 sha256 = "01jlg88q2s6by7qv6fmnrlx0lwjarrjrpxv811zjz6f2im4vg65d";
52− buildInputs = [ fontforge fonttools ];
56+ buildInputs = [ fontforge ];
57+ outputHash = "1q102rmg4004p74f8m4y8a6iklmnva0q39sq260jsq3lhcfypg7p";
5358 };
5459 liberation_ttf_v1_binary = common rec {
5560 version = "1.07.4";
56− url = "https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-${version}.tar.gz";
61+ url = "https://releases.pagure.org/liberation-fonts/liberation-fonts-ttf-${version}.tar.gz";
5762 sha256 = "0p7frz29pmjlk2d0j2zs5kfspygwdnpzxkb2hwzcfhrafjvf59v1";
5863 buildInputs = [ ];
64+ outputHash = "12gwb9b4ij9d93ky4c9ykgp03fqr62axy37pds88q7y6zgciwkab";
5965 };
6066 liberation_ttf_v2_from_source = common rec {
6167 version = "2.00.1";
62− url = "https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-${version}.tar.gz";
68+ url = "https://releases.pagure.org/liberation-fonts/liberation-fonts-${version}.tar.gz";
6369 sha256 = "1ymryvd2nw4jmw4w5y1i3ll2dn48rpkqzlsgv7994lk6qc9cdjvs";
6470 buildInputs = [ fontforge fonttools ];
71+ postPatch = ''
72+ substituteInPlace scripts/setisFixedPitch-fonttools.py --replace \
73+ 'font = ttLib.TTFont(fontfile)' \
74+ 'font = ttLib.TTFont(fontfile, recalcTimestamp=False)'
75+ '';
76+ outputHash = "0nldgawm0a6lpn86w4w3rzx01ns3ph09ar1knq1g4jkxc8ci5rqn";
6577 };
6678 liberation_ttf_v2_binary = common rec {
6779 version = "2.00.1";
68− url = "https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-${version}.tar.gz";
80+ url = "https://releases.pagure.org/liberation-fonts/liberation-fonts-ttf-${version}.tar.gz";
6981 sha256 = "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q";
7082 buildInputs = [ ];
83+ outputHash = "19jky9li345zsig9pcb0rnlsjqqclh7r60vbi4pwh16f14850gpk";
7184 };
7285}