1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00

Added font building support to builder-defs; made realCurl configurable; added Linux Libertine font; added ConTEXt

svn path=/nixpkgs/trunk/; revision=11739
This commit is contained in:
Michael Raskin 2008-04-28 10:10:44 +00:00
parent c9c55bd3fd
commit c6cf72aaa9
2 changed files with 47 additions and 2 deletions

View file

@ -905,10 +905,11 @@ let pkgs = rec {
inherit (xlibs) libX11 libXext;
};
realCurl = import ../tools/networking/curl {
realCurlFun = lib.sumArgs (import ../tools/networking/curl) {
inherit fetchurl stdenv zlib;
zlibSupport = !stdenv ? isDietLibC;
};
realCurl = realCurlFun null;
relfsFun = lib.sumArgs (selectVersion ../tools/misc/relfs "cvs.2008.03.05") {
inherit fetchcvs stdenv ocaml postgresql fuse pcre
@ -4774,6 +4775,14 @@ let pkgs = rec {
inherit fetchurl stdenv;
};
libertineFun = builderDefsPackage (selectVersion ../data/fonts/libertine "2.7") {
inherit fontforge;
};
libertine = libertineFun null;
libertineBinFun = builderDefsPackage (selectVersion ../data/fonts/libertine "2.7.bin") {
};
libertineBin = libertineBinFun null;
lmodernFun = builderDefsPackage (selectVersion ../data/fonts/lmodern "1.010") {
};
lmodern = lmodernFun null;
@ -6459,7 +6468,7 @@ let pkgs = rec {
texLiveFun = builderDefsPackage (import ../misc/tex/texlive) {
inherit builderDefs zlib bzip2 ncurses libpng ed
gd t1lib freetype icu perl;
gd t1lib freetype icu perl ruby;
inherit (xlibs) libXaw libX11 xproto libXt libXpm
libXmu libXext xextproto libSM libICE;
flex = flex2535;
@ -6479,6 +6488,11 @@ let pkgs = rec {
texLive = texLiveFun null;
texLiveAggregationFun = builderDefsPackage (import ../misc/tex/texlive/aggregate.nix);
texLiveContextFun = builderDefsPackage (import ../misc/tex/texlive/context.nix) {
inherit texLive;
};
texLiveContext = texLiveContextFun null;
texLiveExtraFun = builderDefsPackage (import ../misc/tex/texlive/extra.nix) {
inherit texLive;
};

View file

@ -407,4 +407,35 @@ args: with args; with stringsWithDeps; with lib;
} else {}) // extraDerivationAttrs)
);
generateFontsFromSFD = noDepEntry(''
for i in *.sfd; do
${args.fontforge}/bin/fontforge -c \
'Open($1);
Reencode("unicode");
${optionalString (getAttr ["createTTF"] true args) ''Generate($1:r + ".ttf");''}
${optionalString (getAttr ["createOTF"] true args) ''Generate($1:r + ".otf");''}
Reencode("TeX-Base-Encoding");
${optionalString (getAttr ["createAFM"] true args) ''Generate($1:r + ".afm");''}
${optionalString (getAttr ["createPFM"] true args) ''Generate($1:r + ".pfm");''}
${optionalString (getAttr ["createPFB"] true args) ''Generate($1:r + ".pfb");''}
${optionalString (getAttr ["createMAP"] true args) ''Generate($1:r + ".map");''}
${optionalString (getAttr ["createENC"] true args) ''Generate($1:r + ".enc");''}
' $i;
done
'');
installFonts = FullDepEntry (''
ensureDir $out/share/fonts/truetype/public/${args.name}
ensureDir $out/share/fonts/opentype/public/${args.name}
ensureDir $out/share/fonts/type1/public/${args.name}
ensureDir $out/share/texmf/fonts/enc/${args.name}
ensureDir $out/share/texmf/fonts/map/${args.name}
cp *.ttf $out/share/fonts/truetype/public/${args.name} || echo No TrueType fonts
cp *.otf $out/share/fonts/opentype/public/${args.name} || echo No OpenType fonts
cp *.{pfm,afm,pfb} $out/share/fonts/type1/public/${args.name} || echo No Type1 Fonts
cp *.enc $out/share/texmf/fonts/enc/${args.name} || echo No fontenc data
cp *.map $out/share/texmf/fonts/map/${args.name} || echo No fontmap data
'') ["minInit" "defEnsureDir"];
}) // args