dejavu-fonts: simplify build process

Unicode data and fc-lang are only necessary to generate the status
files and coverage information, which are not used, or indeed even
generated with full-ttf.
This commit is contained in:
cmfwyp 2016-08-05 17:27:50 -04:00 committed by Robert Helgesson
parent b4c8ea9536
commit 41b8c6d5a9
No known key found for this signature in database
GPG Key ID: C3DB11069E65DC86

View File

@ -1,21 +1,11 @@
{fetchurl, fetchFromGitHub, stdenv, fontforge, perl, fontconfig, FontTTF}:
{fetchFromGitHub, stdenv, fontforge, perl, FontTTF}:
let version = "2.37" ; in
stdenv.mkDerivation rec {
name = "dejavu-fonts-${version}";
#fontconfig is needed only for fc-lang (?)
buildInputs = [fontforge perl FontTTF];
unicodeData = fetchurl {
url = http://www.unicode.org/Public/9.0.0/ucd/UnicodeData.txt ;
sha256 = "13zfannnr6sa6s27ggvcvzmh133ndi38pfyxsssvjmw2s8ac9pv8";
};
blocks = fetchurl {
url = http://www.unicode.org/Public/9.0.0/ucd/Blocks.txt;
sha256 = "04xyws1prlcnqsryq56sm25dlfvr3464lbjjh9fyaclhi3a2f8b1";
};
src = fetchFromGitHub {
owner = "dejavu-fonts";
repo = "dejavu-fonts";
@ -25,15 +15,7 @@ stdenv.mkDerivation rec {
buildFlags = "full-ttf";
preBuild = ''
sed -e s@/usr/bin/env@$(type -tP env)@ -i scripts/*
sed -e s@/usr/bin/perl@$(type -tP perl)@ -i scripts/*
mkdir resources
tar xf ${fontconfig.src} --wildcards '*/fc-lang'
ln -s $PWD/fontconfig-*/fc-lang -t resources/
ln -s ${unicodeData} resources/UnicodeData.txt
ln -s ${blocks} resources/Blocks.txt
'';
preBuild = "patchShebangs scripts";
installPhase = ''
mkdir -p $out/share/fonts/truetype