2009-04-20 14:49:35 +02:00
|
|
|
{fetchurl, stdenv, fontforge, perl, fontconfig, FontTTF}:
|
2008-03-02 19:39:33 +01:00
|
|
|
|
2012-03-23 10:47:23 +01:00
|
|
|
let version = "2.33" ; in
|
2009-05-06 09:30:13 +02:00
|
|
|
|
2012-03-23 10:47:23 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2009-05-06 09:30:13 +02:00
|
|
|
name = "dejavu-fonts-${version}";
|
2008-03-02 19:39:33 +01:00
|
|
|
#fontconfig is needed only for fc-lang (?)
|
2009-04-20 14:49:35 +02:00
|
|
|
buildInputs = [fontforge perl FontTTF];
|
2012-03-23 10:47:23 +01:00
|
|
|
|
|
|
|
unicodeData = fetchurl {
|
|
|
|
url = http://www.unicode.org/Public/6.1.0/ucd/UnicodeData.txt ;
|
|
|
|
sha256 = "1bd6zkzvxfnifrn5nh171ywk7q56sgk8gdvdn43z9i53hljjcrih";
|
|
|
|
};
|
|
|
|
blocks = fetchurl {
|
|
|
|
url = http://www.unicode.org/Public/6.1.0/ucd/Blocks.txt;
|
|
|
|
sha256 = "0w0vkb09nrlc6mrhqyl9npszdi828afgvhvlb1vs5smjv3h8y3dz";
|
|
|
|
};
|
|
|
|
|
2008-03-02 19:39:33 +01:00
|
|
|
src = fetchurl {
|
2009-05-06 09:30:13 +02:00
|
|
|
url = "mirror://sourceforge/dejavu/dejavu-fonts-${version}.tar.bz2";
|
2012-03-23 10:47:23 +01:00
|
|
|
sha256 = "10m0rds36yyaznfqaa9msayv6f0v1h50zbikja6qdy5dwwxi8q5w";
|
2008-03-02 19:39:33 +01:00
|
|
|
};
|
2012-03-18 09:11:14 +01:00
|
|
|
buildFlags = "full-ttf";
|
2008-03-02 19:39:33 +01:00
|
|
|
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'
|
2009-05-06 09:30:13 +02:00
|
|
|
ln -s $PWD/fontconfig-*/fc-lang -t resources/
|
2012-03-23 10:47:23 +01:00
|
|
|
ln -s ${unicodeData} resources/UnicodeData.txt
|
|
|
|
ln -s ${blocks} resources/Blocks.txt
|
2008-03-02 19:39:33 +01:00
|
|
|
'';
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/fonts/truetype
|
2008-03-02 19:39:33 +01:00
|
|
|
for i in $(find build -name '*.ttf'); do
|
|
|
|
cp $i $out/share/fonts/truetype;
|
|
|
|
done;
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/dejavu-fonts
|
2008-03-02 19:39:33 +01:00
|
|
|
cp -r build/* $out/share/dejavu-fonts
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
|