hollywood: init at 1.22

+165
+94
pkgs/applications/misc/hollywood/default.nix
···
··· 1 + { stdenv 2 + , fetchFromGitHub 3 + , makeWrapper 4 + , lib 5 + , coreutils 6 + , apg 7 + , atop 8 + , bmon 9 + , cmatrix 10 + , pygments 11 + , moreutils 12 + , util-linux 13 + , jp2a 14 + , man 15 + , mplayer 16 + , openssh 17 + , tree 18 + , mlocate 19 + , findutils 20 + , ccze 21 + , ncurses 22 + , python3 23 + , wget 24 + , libcaca 25 + , newsboat 26 + , rsstail 27 + , w3m 28 + , ticker 29 + , tmux 30 + }: 31 + 32 + stdenv.mkDerivation { 33 + pname = "hollywood"; 34 + version = "1.22"; 35 + 36 + src = fetchFromGitHub { 37 + owner = "dustinkirkland"; 38 + repo = "hollywood"; 39 + rev = "35275a68c37bbc39d8b2b0e4664a0c2f5451e5f6"; 40 + sha256 = "sha256-faIm1uXERvIDZ6SK6uarVkWGNJskAroHgq5Cg7nUZc4="; 41 + }; 42 + 43 + nativeBuildInputs = [ makeWrapper ]; 44 + 45 + patches = [ ./nixos-paths.patch ]; 46 + postPatch = '' 47 + rm lib/hollywood/speedometer 48 + rm bin/wallstreet 49 + rm -r lib/wallstreet 50 + ''; 51 + 52 + dontBuild = true; 53 + 54 + installPhase = 55 + let pathDeps = [ 56 + tmux 57 + coreutils 58 + ncurses 59 + jp2a 60 + mlocate 61 + apg 62 + atop 63 + bmon 64 + cmatrix 65 + pygments 66 + moreutils 67 + util-linux 68 + jp2a 69 + man 70 + mplayer 71 + openssh 72 + tree 73 + findutils 74 + ccze 75 + ]; 76 + in '' 77 + runHook preInstall 78 + 79 + mkdir -p $out 80 + cp -r bin $out/bin 81 + cp -r lib $out/lib 82 + cp -r share $out/share 83 + wrapProgram $out/bin/hollywood --prefix PATH : ${lib.makeBinPath pathDeps} 84 + 85 + runHook postInstall 86 + ''; 87 + 88 + meta = { 89 + description = "Fill your console with Hollywood melodrama technobabble"; 90 + homepage = "https://a.hollywood.computer/"; 91 + license = lib.licenses.asl20; 92 + maintainers = [ lib.maintainers.anselmschueler ]; 93 + }; 94 + }
+67
pkgs/applications/misc/hollywood/nixos-paths.patch
···
··· 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 19 + 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 32 + 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 47 + 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 60 + 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
+4
pkgs/top-level/all-packages.nix
··· 27011 gtk = gtk3; 27012 }; 27013 27014 hors = callPackage ../development/tools/hors { 27015 inherit (darwin.apple_sdk.frameworks) Security; 27016 };
··· 27011 gtk = gtk3; 27012 }; 27013 27014 + hollywood = callPackage ../applications/misc/hollywood { 27015 + inherit (python3Packages) pygments; 27016 + }; 27017 + 27018 hors = callPackage ../development/tools/hors { 27019 inherit (darwin.apple_sdk.frameworks) Security; 27020 };