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