Author: simons
Date: Fri Jul 8 22:45:23 2011
New Revision: 27679
URL: https://svn.nixos.org/websvn/nix/?rev=27679&sc=1
Log:
texlive: fixed erroneous forwarder scripts
- Generate a forwarder scripts only for executable files. This change
removes the broken 'man' script, for example.
- Run the real binaries with 'exec'.
- Use $SHELL to interpret the forwarder scripts rather than /bin/sh.
- Indent consistently with blanks.
- Removed some debug output from the build expression.
Modified:
nixpkgs/trunk/pkgs/misc/tex/texlive/aggregate.nix
nixpkgs/trunk/pkgs/misc/tex/texlive/default.nix
Modified: nixpkgs/trunk/pkgs/misc/tex/texlive/aggregate.nix
==============================================================================
--- nixpkgs/trunk/pkgs/misc/tex/texlive/aggregate.nix Fri Jul 8 21:24:01
2011 (r27678)
+++ nixpkgs/trunk/pkgs/misc/tex/texlive/aggregate.nix Fri Jul 8 22:45:23
2011 (r27679)
@@ -12,20 +12,20 @@
echo Symlinking "$currentPath"
find $currentPath/share/info $currentPath/share/man $(echo
$currentPath/texmf*/) ! -type d | while read; do
REPLY="''${REPLY#$currentPath}"
- ensureDir $out/"$(dirname "$REPLY")"
- ln -fs $currentPath/"$REPLY" $out/"$REPLY"
- echo
+ ensureDir $out/"$(dirname "$REPLY")"
+ ln -fs $currentPath/"$REPLY" $out/"$REPLY"
+ echo
done | while read; do head -n 99 >/dev/null; echo -n .; done
- for i in $currentPath/bin/* :; do #*/
- test "$i" = : && continue;
- echo -ne "#! /bin/sh\\n$i \"\$@\"" > "$out/bin/$(basename "$i")"
&& \
+ for i in "$currentPath/bin/"* :; do
+ test "$i" != : || continue
+ echo -ne "#! $SHELL\\nexec $i \"\$@\"" > "$out/bin/$(basename
"$i")" && \
chmod a+x "$out/bin/$(basename "$i")"
done
- echo
+ echo
- cp -Trfp $currentPath/libexec $out/libexec || true
+ cp -Trfp $currentPath/libexec $out/libexec || true
done
ln -s $out/texmf* $out/share/
@@ -39,8 +39,8 @@
for i in $out/libexec/*/* :; do
test "$i" = : && continue;
test -f "$i" && \
- test -x "$i" && \
- echo -ne "#! /bin/sh\\n$i \"\$@\"" >$out/bin/$(basename $i) && \
+ test -x "$i" && \
+ echo -ne "#! $SHELL\\nexec $i \"\$@\"" >$out/bin/$(basename $i) && \
chmod a+x $out/bin/$(basename $i)
done
@@ -58,12 +58,12 @@
meta = {
description = "TeX distribution directory";
longDescription = ''
- Here all the files from different TeX-related
- packages are collected in one directory. Of
- course, mktexlsr is called. Later placed
+ Here all the files from different TeX-related
+ packages are collected in one directory. Of
+ course, mktexlsr is called. Later placed
directories take precedence. It is supposed that
share and libexec are symlinked, and bin is
- recreated with wrappers for libexec-located
+ recreated with wrappers for libexec-located
linked binaries.
'';
};
Modified: nixpkgs/trunk/pkgs/misc/tex/texlive/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/misc/tex/texlive/default.nix Fri Jul 8 21:24:01
2011 (r27678)
+++ nixpkgs/trunk/pkgs/misc/tex/texlive/default.nix Fri Jul 8 22:45:23
2011 (r27679)
@@ -1,11 +1,11 @@
-args : with args;
+args : with args;
rec {
- src = fetchurl {
+ src = fetchurl {
url = mirror://debian/pool/main/t/texlive-bin/texlive-bin_2009.orig.tar.gz;
sha256 = "0ywc8h4jnig53fs0bji2ivw5f9j6zlgdy477jqw7xvpc7migjpw7";
};
-
- texmfSrc = fetchurl {
+
+ texmfSrc = fetchurl {
url =
mirror://debian/pool/main/t/texlive-base/texlive-base_2009.orig.tar.gz;
sha256 = "130z907xcxr10yrzbbmp9l8a00dabvi4bi702s5jxamjzav17cmf";
};
@@ -19,7 +19,7 @@
doMainBuild = fullDepEntry (''
ensureDir $out
- ensureDir $out/nix-support
+ ensureDir $out/nix-support
cp ${setupHook} $out/nix-support/setup-hook.sh
ensureDir $out/share
tar xf ${texmfSrc} -C $out --strip-components=1
@@ -32,7 +32,7 @@
sed -e 's@\<env python@${python}/bin/python@' -i $(grep 'env python' -rl .
)
sed -e '/ubidi_open/i#include <unicode/urename.h>' -i $(find . -name
configure)
- sed -e s@ncurses/[email protected]@g -i $(grep ncurses/curses.h -rl . )
+ sed -e s@ncurses/[email protected]@g -i $(grep ncurses/curses.h -rl . )
sed -e '1i\#include <string.h>\n\#include <stdlib.h>' -i $( find
libs/teckit -name '*.cpp' -o -name '*.c' )
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype}/include/freetype2"
@@ -47,12 +47,13 @@
mv $out/bin $out/libexec
ensureDir $out/bin
for i in "$out/libexec/"*"/"*; do
- echo -ne "#! /bin/sh\\n$i \"\$@\"" >$out/bin/$(basename $i)
+ test \( \! -d "$i" \) -a -x "$i" || continue
+ echo -ne "#! $SHELL\\nexec $i \"\$@\"" >$out/bin/$(basename $i)
chmod a+x $out/bin/$(basename $i)
done
[ -d $out/texmf-config ] || ln -s $out/texmf $out/texmf-config
ln -s "$out/"*texmf* "$out/share/"
-
+
sed -e 's/.*pyhyph.*/=&/' -i
$out/texmf-config/tex/generic/config/language.dat
PATH=$PATH:$out/bin mktexlsr $out/texmf*
@@ -76,18 +77,16 @@
buildInputs = [
zlib bzip2 ncurses libpng flex bison libX11 libICE
- xproto freetype t1lib gd libXaw icu ghostscript ed
- libXt libXpm libXmu libXext xextproto perl libSM
+ xproto freetype t1lib gd libXaw icu ghostscript ed
+ libXt libXpm libXmu libXext xextproto perl libSM
ruby expat curl libjpeg python fontconfig
];
- configureFlags = [ "--with-x11"
+ configureFlags = [ "--with-x11"
"--enable-ipc" "--with-mktexfmt"
];
- phaseNames = ["addInputs" (doDump "0") "doMainBuild"
- (doDump "1")
- "doMakeInstall" "doPostInstall"];
+ phaseNames = ["addInputs" "doMainBuild" "doMakeInstall" "doPostInstall"];
name = "texlive-core-2009";
meta = {
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits