summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorNicolas Pierron <nicolas.b.pierron@gmail.com>2011-04-17 08:27:09 +0000
committerNicolas Pierron <nicolas.b.pierron@gmail.com>2011-04-17 08:27:09 +0000
commit0069aa0637dc1eab64c876e1d9b10117c3cac2e3 (patch)
tree0a9d7cd363476d549013e9a4fd92d08f9bcf3a8c /pkgs/misc
parentd53592905e545a0cb13d3b6ca507a9046e54036f (diff)
texlive Aggregate:
- Add bouncer to binaries stored in /bin directory.
- Avoid manipulation of patterns as a match.

svn path=/nixpkgs/trunk/; revision=26862
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/tex/texlive/aggregate.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/misc/tex/texlive/aggregate.nix b/pkgs/misc/tex/texlive/aggregate.nix
index f60e466930d00..2ea57445eb6c2 100644
--- a/pkgs/misc/tex/texlive/aggregate.nix
+++ b/pkgs/misc/tex/texlive/aggregate.nix
@@ -7,6 +7,7 @@ rec {
 
   doAggregate = fullDepEntry (''
 
+    ensureDir $out/bin
     for currentPath in ${lib.concatStringsSep " " buildInputs}; do
         echo Symlinking "$currentPath"
         find $currentPath/share/info $currentPath/share/man $(echo $currentPath/texmf*/) ! -type d | while read; do
@@ -15,6 +16,13 @@ rec {
 	    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")" && \
+            chmod a+x "$out/bin/$(basename "$i")"
+        done
+
 	echo
 
 	cp -Trfp $currentPath/libexec $out/libexec || true
@@ -28,8 +36,8 @@ rec {
       ensureDir $out/texmf-config/"$REPLY"
     done
 
-    ensureDir $out/bin
-    for i in $out/libexec/*/*; do
+    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) && \