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