2018-04-22 15:24:44 -07:00
|
|
|
{ fetchFromGitHub, stdenv, fontforge, perl, perlPackages }:
|
2008-03-02 10:39:33 -08:00
|
|
|
|
2017-08-19 06:27:26 -07:00
|
|
|
let
|
|
|
|
version = "2.37";
|
2016-08-02 09:06:29 -07:00
|
|
|
|
|
|
|
meta = {
|
2016-08-04 16:00:06 -07: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.
|
|
|
|
'';
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "http://dejavu-fonts.org/wiki/Main_Page";
|
2016-08-04 16:00:06 -07:00
|
|
|
|
|
|
|
# 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;
|
|
|
|
|
2018-07-20 10:55:21 -07:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2016-08-02 09:06:29 -07:00
|
|
|
};
|
2017-08-19 06:27:26 -07:00
|
|
|
|
|
|
|
full-ttf = stdenv.mkDerivation {
|
2019-08-13 14:52:01 -07:00
|
|
|
pname = "dejavu-fonts-full";
|
|
|
|
inherit version;
|
2018-04-22 15:24:44 -07:00
|
|
|
nativeBuildInputs = [fontforge perl perlPackages.IOString perlPackages.FontTTF];
|
2017-08-19 06:27:26 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dejavu-fonts";
|
|
|
|
repo = "dejavu-fonts";
|
|
|
|
rev = "version_${stdenv.lib.replaceStrings ["."] ["_"] version}";
|
|
|
|
sha256 = "1xknlg2h287dx34v2n5r33bpcl4biqf0cv7nak657rjki7s0k4bk";
|
|
|
|
};
|
|
|
|
|
2019-10-26 08:39:27 -07:00
|
|
|
buildFlags = [ "full-ttf" ];
|
2017-08-19 06:27:26 -07:00
|
|
|
|
|
|
|
preBuild = "patchShebangs scripts";
|
|
|
|
|
2019-05-12 20:54:44 -07:00
|
|
|
installPhase = "install -m444 -Dt $out/share/fonts/truetype build/*.ttf";
|
2017-08-19 06:27:26 -07:00
|
|
|
|
|
|
|
inherit meta;
|
|
|
|
};
|
|
|
|
|
|
|
|
minimal = stdenv.mkDerivation {
|
2019-08-13 14:52:01 -07:00
|
|
|
pname = "dejavu-fonts-minimal";
|
|
|
|
inherit version;
|
2017-08-19 06:27:26 -07:00
|
|
|
buildCommand = ''
|
2019-05-12 20:54:44 -07:00
|
|
|
install -m444 -Dt $out/share/fonts/truetype ${full-ttf}/share/fonts/truetype/DejaVuSans.ttf
|
2017-08-19 06:27:26 -07:00
|
|
|
'';
|
|
|
|
inherit meta;
|
|
|
|
};
|
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 14:52:01 -07:00
|
|
|
pname = "dejavu-fonts";
|
|
|
|
inherit version;
|
2017-08-19 06:27:26 -07:00
|
|
|
buildCommand = ''
|
2019-05-12 20:54:44 -07:00
|
|
|
install -m444 -Dt $out/share/fonts/truetype ${full-ttf}/share/fonts/truetype/*.ttf
|
2017-12-20 13:53:46 -08:00
|
|
|
ln -s --relative --force --target-directory=$out/share/fonts/truetype ${minimal}/share/fonts/truetype/DejaVuSans.ttf
|
2017-08-19 06:27:26 -07:00
|
|
|
'';
|
|
|
|
inherit meta;
|
|
|
|
|
2019-05-12 20:54:44 -07:00
|
|
|
passthru = { inherit minimal full-ttf; };
|
2008-03-02 10:39:33 -08:00
|
|
|
}
|