2016-08-05 22:27:50 +01:00
|
|
|
{fetchFromGitHub, stdenv, fontforge, perl, FontTTF}:
|
2008-03-02 18:39:33 +00:00
|
|
|
|
2016-08-05 00:00:06 +01:00
|
|
|
let version = "2.37" ; in
|
2009-05-06 08:30:13 +01:00
|
|
|
|
2012-03-23 09:47:23 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2009-05-06 08:30:13 +01:00
|
|
|
name = "dejavu-fonts-${version}";
|
2009-04-20 13:49:35 +01:00
|
|
|
buildInputs = [fontforge perl FontTTF];
|
2012-03-23 09:47:23 +00:00
|
|
|
|
2016-08-05 00:00:06 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dejavu-fonts";
|
|
|
|
repo = "dejavu-fonts";
|
|
|
|
rev = "version_${stdenv.lib.replaceStrings ["."] ["_"] version}";
|
|
|
|
sha256 = "1xknlg2h287dx34v2n5r33bpcl4biqf0cv7nak657rjki7s0k4bk";
|
2008-03-02 18:39:33 +00:00
|
|
|
};
|
2015-09-23 21:44:28 +01:00
|
|
|
|
2016-08-29 19:21:32 +01:00
|
|
|
outputs = [ "out" "minimal" ];
|
|
|
|
|
2012-03-18 08:11:14 +00:00
|
|
|
buildFlags = "full-ttf";
|
2015-09-23 21:44:28 +01:00
|
|
|
|
2016-08-05 22:27:50 +01:00
|
|
|
preBuild = "patchShebangs scripts";
|
2015-09-23 21:44:28 +01:00
|
|
|
|
2015-07-26 16:47:04 +01:00
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/fonts/truetype
|
2015-07-26 16:47:04 +01:00
|
|
|
for i in $(find build -name '*.ttf'); do
|
|
|
|
cp $i $out/share/fonts/truetype;
|
2008-03-02 18:39:33 +00:00
|
|
|
done;
|
2016-08-29 19:21:32 +01:00
|
|
|
'' + ''
|
|
|
|
local fname=share/fonts/truetype/DejaVuSans.ttf
|
|
|
|
moveToOutput "$fname" "$minimal"
|
|
|
|
ln -s "$minimal/$fname" "$out/$fname"
|
2008-03-02 18:39:33 +00:00
|
|
|
'';
|
2016-08-02 17:06:29 +01:00
|
|
|
|
|
|
|
meta = {
|
2016-08-05 00:00:06 +01:00
|
|
|
description = "A typeface family based on the Bitstream Vera fonts";
|
|
|
|
longDescription = ''
|
|
|
|
The DejaVu fonts are TrueType fonts based on the BitStream Vera fonts,
|
|
|
|
providing more styles and with greater coverage of Unicode.
|
|
|
|
|
|
|
|
This package includes DejaVu Sans, DejaVu Serif, DejaVu Sans Mono, and
|
|
|
|
the TeX Gyre DejaVu Math font.
|
|
|
|
'';
|
|
|
|
homepage = http://dejavu-fonts.org/wiki/Main_Page;
|
|
|
|
|
|
|
|
# Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved.
|
|
|
|
# Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
|
|
|
|
# DejaVu changes are in public domain
|
|
|
|
# See http://dejavu-fonts.org/wiki/License for details
|
|
|
|
license = stdenv.lib.licenses.free;
|
|
|
|
|
2016-09-04 04:40:08 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2016-08-02 17:06:29 +01:00
|
|
|
};
|
2008-03-02 18:39:33 +00:00
|
|
|
}
|