2017-02-08 18:41:22 +00:00
|
|
|
{stdenv, fetchurl, fontforge, python2}:
|
2008-03-02 18:39:33 +00:00
|
|
|
|
2017-02-03 20:19:37 +00:00
|
|
|
let
|
2017-02-09 07:42:04 +00:00
|
|
|
inherit (python2.pkgs) fonttools;
|
2014-11-06 09:03:42 +00:00
|
|
|
|
2017-02-03 20:19:37 +00:00
|
|
|
common =
|
2018-01-10 00:27:23 +00:00
|
|
|
{version, url, sha256, nativeBuildInputs, postPatch ? null, outputHash}:
|
2017-02-03 20:19:37 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "liberation-fonts-${version}";
|
|
|
|
src = fetchurl {
|
|
|
|
inherit url sha256;
|
|
|
|
};
|
2014-11-06 09:03:42 +00:00
|
|
|
|
2018-01-10 00:27:23 +00:00
|
|
|
inherit nativeBuildInputs postPatch;
|
2017-02-03 20:19:37 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/fonts/truetype
|
|
|
|
cp -v $( find . -name '*.ttf') $out/share/fonts/truetype
|
|
|
|
|
2017-08-19 07:27:59 +01:00
|
|
|
mkdir -p "$out/share/doc/${name}"
|
|
|
|
cp -v AUTHORS ChangeLog COPYING License.txt README "$out/share/doc/${name}" || true
|
2017-02-03 20:19:37 +00:00
|
|
|
'';
|
|
|
|
|
2017-08-19 07:27:59 +01:00
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHashMode = "recursive";
|
|
|
|
inherit outputHash;
|
|
|
|
|
2017-02-03 20:19:37 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Liberation Fonts, replacements for Times New Roman, Arial, and Courier New";
|
|
|
|
longDescription = ''
|
|
|
|
The Liberation Fonts are intended to be replacements for the three most
|
|
|
|
commonly used fonts on Microsoft systems: Times New Roman, Arial, and
|
|
|
|
Courier New. Since 2012 they are based on croscore fonts.
|
|
|
|
|
|
|
|
There are three sets: Sans (a substitute for Arial, Albany, Helvetica,
|
|
|
|
Nimbus Sans L, and Bitstream Vera Sans), Serif (a substitute for Times
|
|
|
|
New Roman, Thorndale, Nimbus Roman, and Bitstream Vera Serif) and Mono
|
|
|
|
(a substitute for Courier New, Cumberland, Courier, Nimbus Mono L, and
|
|
|
|
Bitstream Vera Sans Mono).
|
|
|
|
'';
|
|
|
|
|
|
|
|
license = licenses.ofl;
|
2017-08-19 07:27:59 +01:00
|
|
|
homepage = https://pagure.io/liberation-fonts/;
|
2017-02-03 20:19:37 +00:00
|
|
|
maintainers = [
|
|
|
|
maintainers.raskin
|
|
|
|
];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in {
|
|
|
|
liberation_ttf_v1_from_source = common rec {
|
|
|
|
version = "1.07.4";
|
2017-08-19 07:27:59 +01:00
|
|
|
url = "https://releases.pagure.org/liberation-fonts/liberation-fonts-${version}.tar.gz";
|
2017-02-03 20:19:37 +00:00
|
|
|
sha256 = "01jlg88q2s6by7qv6fmnrlx0lwjarrjrpxv811zjz6f2im4vg65d";
|
2018-01-10 00:27:23 +00:00
|
|
|
nativeBuildInputs = [ fontforge ];
|
2017-08-19 07:27:59 +01:00
|
|
|
outputHash = "1q102rmg4004p74f8m4y8a6iklmnva0q39sq260jsq3lhcfypg7p";
|
2017-02-03 20:19:37 +00:00
|
|
|
};
|
|
|
|
liberation_ttf_v1_binary = common rec {
|
|
|
|
version = "1.07.4";
|
2017-08-19 07:27:59 +01:00
|
|
|
url = "https://releases.pagure.org/liberation-fonts/liberation-fonts-ttf-${version}.tar.gz";
|
2017-02-03 20:19:37 +00:00
|
|
|
sha256 = "0p7frz29pmjlk2d0j2zs5kfspygwdnpzxkb2hwzcfhrafjvf59v1";
|
2018-01-10 00:27:23 +00:00
|
|
|
nativeBuildInputs = [ ];
|
2017-08-19 07:27:59 +01:00
|
|
|
outputHash = "12gwb9b4ij9d93ky4c9ykgp03fqr62axy37pds88q7y6zgciwkab";
|
2017-02-03 20:19:37 +00:00
|
|
|
};
|
|
|
|
liberation_ttf_v2_from_source = common rec {
|
|
|
|
version = "2.00.1";
|
2017-08-19 07:27:59 +01:00
|
|
|
url = "https://releases.pagure.org/liberation-fonts/liberation-fonts-${version}.tar.gz";
|
2014-11-06 17:42:37 +00:00
|
|
|
sha256 = "1ymryvd2nw4jmw4w5y1i3ll2dn48rpkqzlsgv7994lk6qc9cdjvs";
|
2018-01-10 00:27:23 +00:00
|
|
|
nativeBuildInputs = [ fontforge fonttools ];
|
2017-08-19 07:27:59 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace scripts/setisFixedPitch-fonttools.py --replace \
|
|
|
|
'font = ttLib.TTFont(fontfile)' \
|
|
|
|
'font = ttLib.TTFont(fontfile, recalcTimestamp=False)'
|
|
|
|
'';
|
|
|
|
outputHash = "0nldgawm0a6lpn86w4w3rzx01ns3ph09ar1knq1g4jkxc8ci5rqn";
|
2008-03-02 18:39:33 +00:00
|
|
|
};
|
2017-02-03 20:19:37 +00:00
|
|
|
liberation_ttf_v2_binary = common rec {
|
|
|
|
version = "2.00.1";
|
2017-08-19 07:27:59 +01:00
|
|
|
url = "https://releases.pagure.org/liberation-fonts/liberation-fonts-ttf-${version}.tar.gz";
|
2017-02-03 20:19:37 +00:00
|
|
|
sha256 = "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q";
|
2018-01-10 00:27:23 +00:00
|
|
|
nativeBuildInputs = [ ];
|
2017-08-19 07:27:59 +01:00
|
|
|
outputHash = "19jky9li345zsig9pcb0rnlsjqqclh7r60vbi4pwh16f14850gpk";
|
2009-07-09 13:07:45 +01:00
|
|
|
};
|
2008-03-02 18:39:33 +00:00
|
|
|
}
|