2009-04-20 14:49:35 +02:00
|
|
|
{fetchurl, stdenv, fontforge, perl, fontconfig, FontTTF}:
|
2008-03-02 19:39:33 +01:00
|
|
|
|
2009-05-06 09:30:13 +02:00
|
|
|
let version = "2.29" ; in
|
|
|
|
|
2008-03-02 19:39:33 +01:00
|
|
|
stdenv.mkDerivation {
|
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];
|
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";
|
|
|
|
sha256 = "1h8x0bnbh9awwsxiwjpp73iczk1y4d5y0as1f4zb4pbk6l2m7v60";
|
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/
|
|
|
|
ln -s ${perl}/lib/*/*/unicore/* -t resources/
|
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
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
|