2009-04-20 14:49:35 +02:00
|
|
|
{fetchurl, stdenv, fontforge, perl, fontconfig, FontTTF}:
|
2008-03-02 19:39:33 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "dejavu-fonts-2.23";
|
|
|
|
#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 {
|
|
|
|
url = mirror://sourceforge/dejavu/dejavu-fonts-2.23.tar.bz2;
|
|
|
|
sha256 = "0gifaxiianls54i05yw5gxhi2a0j9jmy5p0q58ym4l9fxv5drnhn";
|
|
|
|
};
|
|
|
|
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 resources/
|
|
|
|
ln -s ${perl}/lib/*/unicore/* resources/
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
ensureDir $out/share/fonts/truetype
|
|
|
|
for i in $(find build -name '*.ttf'); do
|
|
|
|
cp $i $out/share/fonts/truetype;
|
|
|
|
done;
|
|
|
|
ensureDir $out/share/dejavu-fonts
|
|
|
|
cp -r build/* $out/share/dejavu-fonts
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
|