2009-04-20 14:49:35 +02:00
|
|
|
{fetchurl, stdenv, fontforge, perl, fontconfig, FontTTF}:
|
2008-03-02 19:39:33 +01:00
|
|
|
|
2015-06-22 22:42:40 +02:00
|
|
|
let version = "2.35" ; 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 {
|
2013-11-25 23:28:09 +01:00
|
|
|
url = http://www.unicode.org/Public/6.1.0/ucd/UnicodeData.txt ;
|
2012-03-23 10:47:23 +01:00
|
|
|
sha256 = "1bd6zkzvxfnifrn5nh171ywk7q56sgk8gdvdn43z9i53hljjcrih";
|
|
|
|
};
|
|
|
|
blocks = fetchurl {
|
2013-11-25 23:28:09 +01:00
|
|
|
url = http://www.unicode.org/Public/6.1.0/ucd/Blocks.txt;
|
2012-03-23 10:47:23 +01:00
|
|
|
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";
|
2015-06-22 22:42:40 +02:00
|
|
|
sha256 = "1xdbi4llrq1qbkd73352ibrfqcbz93dww8hab216qz5szd95yvv4";
|
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
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
|