texLive: fix build on darwin
vcunat edit: use ruby19 on all platforms now. See #700 for discussion related to the changes.
This commit is contained in:
parent
782ae25458
commit
bcec0454e9
@ -15,30 +15,33 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
buildInputs = [ flex bison zlib libpng ncurses ed ];
|
buildInputs = [ flex bison zlib libpng ncurses ed ];
|
||||||
|
|
||||||
|
# fixes "error: conflicting types for 'calloc'", etc.
|
||||||
|
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
|
sed -i 57d texk/kpathsea/c-std.h
|
||||||
|
'';
|
||||||
|
|
||||||
patches = [ ./environment.patch ./getline.patch ];
|
patches = [ ./environment.patch ./getline.patch ];
|
||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
[ "--disable-multiplatform"
|
[ "--disable-multiplatform" "--without-x11" "--without-xdvik"
|
||||||
"--without-x11"
|
"--without-oxdvik" "--without-texinfo" "--without-texi2html"
|
||||||
"--without-xdvik"
|
"--with-system-zlib" "--with-system-pnglib" "--with-system-ncurses" ]
|
||||||
"--without-oxdvik"
|
# couldn't get gsftopk working on darwin
|
||||||
"--without-texinfo"
|
++ stdenv.lib.optional stdenv.isDarwin "--without-gsftopk";
|
||||||
"--without-texi2html"
|
|
||||||
"--with-system-zlib"
|
|
||||||
"--with-system-pnglib"
|
|
||||||
"--with-system-ncurses"
|
|
||||||
];
|
|
||||||
|
|
||||||
postUnpack =
|
postUnpack = ''
|
||||||
''
|
mkdir -p $out/share/texmf
|
||||||
mkdir -p $out/share/texmf
|
mkdir -p $out/share/texmf-dist
|
||||||
mkdir -p $out/share/texmf-dist
|
gunzip < $texmf | (cd $out/share/texmf-dist && tar xvf -)
|
||||||
gunzip < $texmf | (cd $out/share/texmf-dist && tar xvf -)
|
'';
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "A full-featured (La)TeX distribution";
|
description = "A full-featured (La)TeX distribution";
|
||||||
|
homepage = http://www.tug.org/tetex/;
|
||||||
|
matintainers = with maintainers; [ lovek323 ];
|
||||||
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
args : with args;
|
args : with args;
|
||||||
rec {
|
rec {
|
||||||
phaseNames = ["doAggregate"];
|
|
||||||
name = "TeXLive-linkdir";
|
name = "TeXLive-linkdir";
|
||||||
|
|
||||||
buildInputs = lib.closePropagation paths;
|
buildInputs = lib.closePropagation paths
|
||||||
|
++ stdenv.lib.optional stdenv.isDarwin makeWrapper;
|
||||||
|
|
||||||
|
phaseNames = [ "doAggregate" ];
|
||||||
|
|
||||||
doAggregate = fullDepEntry (''
|
doAggregate = fullDepEntry (''
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
for currentPath in ${lib.concatStringsSep " " buildInputs}; do
|
for currentPath in ${lib.concatStringsSep " " buildInputs}; do
|
||||||
echo Symlinking "$currentPath"
|
echo Symlinking "$currentPath"
|
||||||
@ -54,7 +55,13 @@ rec {
|
|||||||
yes | PATH=$PATH:$out/bin mktexlsr $out/texmf*
|
yes | PATH=$PATH:$out/bin mktexlsr $out/texmf*
|
||||||
yes | TEXMFCONFIG=$out/texmf-config HOME=$PWD PATH=$PATH:$out/bin updmap --syncwithtrees
|
yes | TEXMFCONFIG=$out/texmf-config HOME=$PWD PATH=$PATH:$out/bin updmap --syncwithtrees
|
||||||
yes | PATH=$PATH:$out/bin mktexlsr $out/texmf*
|
yes | PATH=$PATH:$out/bin mktexlsr $out/texmf*
|
||||||
'') ["minInit" "defEnsureDir" "addInputs"];
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
|
# did the same thing in texLive, but couldn't get it to carry to the
|
||||||
|
# binaries installed by texLiveFull
|
||||||
|
for prog in $out/bin/*; do
|
||||||
|
wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${poppler}/lib"
|
||||||
|
done
|
||||||
|
'' ) [ "minInit" "defEnsureDir" "addInputs" ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "TeX distribution directory";
|
description = "TeX distribution directory";
|
||||||
|
@ -17,7 +17,9 @@ rec {
|
|||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
|
|
||||||
doMainBuild = fullDepEntry (''
|
doMainBuild = fullDepEntry ( stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
|
export DYLD_LIBRARY_PATH="${poppler}/lib"
|
||||||
|
'' + ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
cp ${setupHook} $out/nix-support/setup-hook.sh
|
cp ${setupHook} $out/nix-support/setup-hook.sh
|
||||||
@ -41,24 +43,26 @@ rec {
|
|||||||
./Build --prefix="$out" --datadir="$out/share" --mandir "$out/share/man" --infodir "$out/share/info" \
|
./Build --prefix="$out" --datadir="$out/share" --mandir "$out/share/man" --infodir "$out/share/info" \
|
||||||
${args.lib.concatStringsSep " " configureFlags}
|
${args.lib.concatStringsSep " " configureFlags}
|
||||||
cd Work
|
cd Work
|
||||||
'') ["minInit" "doUnpack" "addInputs" "defEnsureDir"];
|
'' ) [ "minInit" "doUnpack" "addInputs" "defEnsureDir" ];
|
||||||
|
|
||||||
doPostInstall = fullDepEntry(''
|
doPostInstall = fullDepEntry( ''
|
||||||
mkdir -p $out/libexec/
|
mkdir -p $out/libexec/
|
||||||
mv $out/bin $out/libexec/$(uname -m)
|
mv $out/bin $out/libexec/$(uname -m)
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
for i in "$out/libexec/"* "$out/libexec/"*/* ; do
|
for i in "$out/libexec/"* "$out/libexec/"*/* ; do
|
||||||
test \( \! -d "$i" \) -a \( -x "$i" -o -L "$i" \) || continue
|
test \( \! -d "$i" \) -a \( -x "$i" -o -L "$i" \) || continue
|
||||||
if [ -x "$i" ]; then
|
|
||||||
echo -ne "#! $SHELL\\nexec $i \"\$@\"" >$out/bin/$(basename $i)
|
if [ -x "$i" ]; then
|
||||||
chmod a+x $out/bin/$(basename $i)
|
echo -ne "#! $SHELL\\nexec $i \"\$@\"" >$out/bin/$(basename $i)
|
||||||
else
|
chmod a+x $out/bin/$(basename $i)
|
||||||
mv "$i" "$out/libexec"
|
else
|
||||||
ln -s "$(readlink -f "$out/libexec/$(basename "$i")")" "$out/bin/$(basename "$i")";
|
mv "$i" "$out/libexec"
|
||||||
ln -sf "$(readlink -f "$out/libexec/$(basename "$i")")" "$out/libexec/$(uname -m)/$(basename "$i")";
|
ln -s "$(readlink -f "$out/libexec/$(basename "$i")")" "$out/bin/$(basename "$i")";
|
||||||
rm "$out/libexec/$(basename "$i")"
|
ln -sf "$(readlink -f "$out/libexec/$(basename "$i")")" "$out/libexec/$(uname -m)/$(basename "$i")";
|
||||||
fi;
|
rm "$out/libexec/$(basename "$i")"
|
||||||
|
fi;
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -d $out/texmf-config ] || ln -s $out/texmf $out/texmf-config
|
[ -d $out/texmf-config ] || ln -s $out/texmf $out/texmf-config
|
||||||
ln -s -v "$out/"*texmf* "$out/share/" || true
|
ln -s -v "$out/"*texmf* "$out/share/" || true
|
||||||
|
|
||||||
@ -81,29 +85,37 @@ rec {
|
|||||||
PATH="$PATH:$out/bin" fmtutil-sys --all || true
|
PATH="$PATH:$out/bin" fmtutil-sys --all || true
|
||||||
|
|
||||||
PATH=$PATH:$out/bin mktexlsr $out/texmf*
|
PATH=$PATH:$out/bin mktexlsr $out/texmf*
|
||||||
'') ["minInit" "defEnsureDir" "doUnpack" "doMakeInstall"];
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
|
for prog in $out/bin/*; do
|
||||||
|
wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${poppler}/lib"
|
||||||
|
done
|
||||||
|
'' ) [ "minInit" "defEnsureDir" "doUnpack" "doMakeInstall" ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [ zlib bzip2 ncurses libpng flex bison libX11 libICE xproto
|
||||||
zlib bzip2 ncurses libpng flex bison libX11 libICE
|
freetype t1lib gd libXaw icu ghostscript ed libXt libXpm libXmu libXext
|
||||||
xproto freetype t1lib gd libXaw icu ghostscript ed
|
xextproto perl libSM ruby expat curl libjpeg python fontconfig xz pkgconfig
|
||||||
libXt libXpm libXmu libXext xextproto perl libSM
|
poppler silgraphite lesstif zziplib ]
|
||||||
ruby expat curl libjpeg python fontconfig xz
|
++ stdenv.lib.optionals stdenv.isDarwin [ makeWrapper ];
|
||||||
pkgconfig poppler silgraphite lesstif zziplib
|
|
||||||
];
|
|
||||||
|
|
||||||
configureFlags = [ "--with-x11"
|
configureFlags = [ "--with-x11" "--enable-ipc" "--with-mktexfmt"
|
||||||
"--enable-ipc" "--with-mktexfmt" "--enable-shared"
|
"--enable-shared" "--disable-native-texlive-build" "--with-system-zziplib"
|
||||||
"--disable-native-texlive-build" "--with-system-zziplib"
|
"--with-system-libgs" "--with-system-t1lib" "--with-system-freetype2" ]
|
||||||
"--with-system-icu" "--with-system-libgs" "--with-system-t1lib"
|
++ ( if stdenv.isDarwin
|
||||||
"--with-system-freetype2"
|
# ironically, couldn't get xetex compiling on darwin
|
||||||
];
|
then [ "--disable-xetex" "--disable-xdv2pdf" "--disable-xdvipdfmx" ]
|
||||||
|
# couldn't seem to get system icu working on darwin
|
||||||
|
else [ "--with-system-icu" ] );
|
||||||
|
|
||||||
phaseNames = ["addInputs" "doMainBuild" "doMakeInstall" "doPostInstall"];
|
phaseNames = [ "addInputs" "doMainBuild" "doMakeInstall" "doPostInstall" ];
|
||||||
|
|
||||||
name = "texlive-core-2012";
|
name = "texlive-core-2012";
|
||||||
meta = {
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
description = "A TeX distribution";
|
description = "A TeX distribution";
|
||||||
maintainers = [ args.lib.maintainers.raskin ];
|
homepage = http://www.tug.org/texlive;
|
||||||
platforms = args.lib.platforms.linux ++ args.lib.platforms.freebsd ;
|
licnese = stdenv.lib.licneses.gpl2;
|
||||||
|
maintainers = with maintainers; [ lovek323 raskin ];
|
||||||
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9827,19 +9827,20 @@ let
|
|||||||
texFunctions = import ../tools/typesetting/tex/nix pkgs;
|
texFunctions = import ../tools/typesetting/tex/nix pkgs;
|
||||||
|
|
||||||
texLive = builderDefsPackage (import ../tools/typesetting/tex/texlive) {
|
texLive = builderDefsPackage (import ../tools/typesetting/tex/texlive) {
|
||||||
inherit builderDefs zlib bzip2 ncurses libpng ed lesstif
|
inherit builderDefs zlib bzip2 ncurses libpng ed lesstif ruby
|
||||||
gd t1lib freetype icu perl expat curl xz pkgconfig zziplib
|
gd t1lib freetype icu perl expat curl xz pkgconfig zziplib
|
||||||
libjpeg bison python fontconfig flex poppler silgraphite;
|
libjpeg bison python fontconfig flex poppler silgraphite makeWrapper;
|
||||||
inherit (xlibs) libXaw libX11 xproto libXt libXpm
|
inherit (xlibs) libXaw libX11 xproto libXt libXpm
|
||||||
libXmu libXext xextproto libSM libICE;
|
libXmu libXext xextproto libSM libICE;
|
||||||
ghostscript = ghostscriptX;
|
ghostscript = ghostscriptX;
|
||||||
ruby = ruby18;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
texLiveFull = lib.setName "texlive-full" (texLiveAggregationFun {
|
texLiveFull = lib.setName "texlive-full" (texLiveAggregationFun {
|
||||||
paths = [ texLive texLiveExtra lmodern texLiveCMSuper texLiveLatexXColor
|
paths = [ texLive texLiveExtra lmodern texLiveCMSuper texLiveLatexXColor
|
||||||
texLivePGF texLiveBeamer texLiveModerncv tipa tex4ht texinfo5
|
texLivePGF texLiveBeamer texLiveModerncv tipa tex4ht texinfo5
|
||||||
texLiveModerntimeline ];
|
texLiveModerntimeline ];
|
||||||
|
|
||||||
|
inherit poppler makeWrapper;
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Look in configurations/misc/raskin.nix for usage example (around revisions
|
/* Look in configurations/misc/raskin.nix for usage example (around revisions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user