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