Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / misc / hollywood / nixos-paths.patch
blobd280a6b003c1e2e84c9cca324b9b5ff489c50244
1 diff --git a/bin/hollywood b/bin/hollywood
2 index 6f1ee68..09bc4ea 100755
3 --- a/bin/hollywood
4 +++ b/bin/hollywood
5 @@ -74,7 +74,7 @@ if [ -z "$TMUX" ]; then
6 else
7 tmux_launcher=tmux
8 fi
9 - $tmux_launcher new-session -d -s $PKG "/bin/bash"
10 + $tmux_launcher new-session -d -s $PKG "/usr/bin/env bash"
11 $tmux_launcher send-keys -t $PKG "$0 $1"
12 $tmux_launcher send-keys -t $PKG Enter
13 exec $tmux_launcher attach-session -t $PKG
14 diff --git a/lib/hollywood/code b/lib/hollywood/code
15 index 532ce73..3448447 100755
16 --- a/lib/hollywood/code
17 +++ b/lib/hollywood/code
18 @@ -19,7 +19,7 @@ command -v view >/dev/null 2>&1 || exit 1
20 trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
21 while true; do
22 - FILES=$(locate -l 4096 "/usr/*.java" "/usr/*.c" "/usr/*.cpp" 2>/dev/null | sort -R)
23 + FILES=$(locate -l 4096 "/usr/*.java" "/run/current-system/sw/*.java" "/usr/*.c" "/run/current-system/sw/*.c" "/usr/*.cpp" "/run/current-system/sw/*.cpp" 2>/dev/null | sort -R)
24 for f in $FILES; do
25 [ -r "$f" ] || continue
26 [ -s "$f" ] || continue
27 diff --git a/lib/hollywood/hexdump b/lib/hollywood/hexdump
28 index f2fb0bd..db059f5 100755
29 --- a/lib/hollywood/hexdump
30 +++ b/lib/hollywood/hexdump
31 @@ -19,8 +19,8 @@ command -v ccze >/dev/null 2>&1 || exit 1
33 trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
34 while true; do
35 - for f in $(ls /usr/bin/ | sort -R); do
36 - head -c 4096 "/usr/bin/$f" | hexdump -C | ccze -A -c default=green -c dir="bold green"
37 + for f in $(find /usr/bin/ /run/current-system/sw/bin/ | sort -R); do
38 + head -c 4096 "$f" | hexdump -C | ccze -A -c default=green -c dir="bold green"
39 sleep 0.7
40 done
41 done
42 diff --git a/lib/hollywood/jp2a b/lib/hollywood/jp2a
43 index e87b950..6541f80 100755
44 --- a/lib/hollywood/jp2a
45 +++ b/lib/hollywood/jp2a
46 @@ -19,7 +19,7 @@ command -v jp2a >/dev/null 2>&1 || exit 1
48 trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
49 while true; do
50 - FILES=$(locate -l 4096 "/usr/*jpg" 2>/dev/null | sort -R)
51 + FILES=$(locate -l 4096 "/usr/*jpg" "/run/current-system/sw/*jpg" 2>/dev/null | sort -R)
52 for f in $FILES; do
53 [ -r "$f" ] || continue
54 [ -s "$f" ] || continue
55 diff --git a/lib/hollywood/man b/lib/hollywood/man
56 index 2d42513..f4d8bbb 100755
57 --- a/lib/hollywood/man
58 +++ b/lib/hollywood/man
59 @@ -19,7 +19,7 @@ command -v ccze >/dev/null 2>&1 || exit 1
61 trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
62 while true; do
63 - FILES=$(ls /usr/share/man/man1/ | sort -R | sed "s/\.1\.gz.*$//" | head -n 4096)
64 + FILES=$(ls /usr/share/man/man1/ /run/current-system/sw/share/man/man1/ | sort -R | sed "s/\.1\.gz.*$//" | head -n 4096)
65 for f in $FILES; do
66 man "$f" | ccze -A
67 sleep 0.2