tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
hollywood: init at 1.22
Anselm Schüler
3 years ago
2d66c91a
57594292
+165
3 changed files
expand all
collapse all
unified
split
pkgs
applications
misc
hollywood
default.nix
nixos-paths.patch
top-level
all-packages.nix
+94
pkgs/applications/misc/hollywood/default.nix
···
1
1
+
{ stdenv
2
2
+
, fetchFromGitHub
3
3
+
, makeWrapper
4
4
+
, lib
5
5
+
, coreutils
6
6
+
, apg
7
7
+
, atop
8
8
+
, bmon
9
9
+
, cmatrix
10
10
+
, pygments
11
11
+
, moreutils
12
12
+
, util-linux
13
13
+
, jp2a
14
14
+
, man
15
15
+
, mplayer
16
16
+
, openssh
17
17
+
, tree
18
18
+
, mlocate
19
19
+
, findutils
20
20
+
, ccze
21
21
+
, ncurses
22
22
+
, python3
23
23
+
, wget
24
24
+
, libcaca
25
25
+
, newsboat
26
26
+
, rsstail
27
27
+
, w3m
28
28
+
, ticker
29
29
+
, tmux
30
30
+
}:
31
31
+
32
32
+
stdenv.mkDerivation {
33
33
+
pname = "hollywood";
34
34
+
version = "1.22";
35
35
+
36
36
+
src = fetchFromGitHub {
37
37
+
owner = "dustinkirkland";
38
38
+
repo = "hollywood";
39
39
+
rev = "35275a68c37bbc39d8b2b0e4664a0c2f5451e5f6";
40
40
+
sha256 = "sha256-faIm1uXERvIDZ6SK6uarVkWGNJskAroHgq5Cg7nUZc4=";
41
41
+
};
42
42
+
43
43
+
nativeBuildInputs = [ makeWrapper ];
44
44
+
45
45
+
patches = [ ./nixos-paths.patch ];
46
46
+
postPatch = ''
47
47
+
rm lib/hollywood/speedometer
48
48
+
rm bin/wallstreet
49
49
+
rm -r lib/wallstreet
50
50
+
'';
51
51
+
52
52
+
dontBuild = true;
53
53
+
54
54
+
installPhase =
55
55
+
let pathDeps = [
56
56
+
tmux
57
57
+
coreutils
58
58
+
ncurses
59
59
+
jp2a
60
60
+
mlocate
61
61
+
apg
62
62
+
atop
63
63
+
bmon
64
64
+
cmatrix
65
65
+
pygments
66
66
+
moreutils
67
67
+
util-linux
68
68
+
jp2a
69
69
+
man
70
70
+
mplayer
71
71
+
openssh
72
72
+
tree
73
73
+
findutils
74
74
+
ccze
75
75
+
];
76
76
+
in ''
77
77
+
runHook preInstall
78
78
+
79
79
+
mkdir -p $out
80
80
+
cp -r bin $out/bin
81
81
+
cp -r lib $out/lib
82
82
+
cp -r share $out/share
83
83
+
wrapProgram $out/bin/hollywood --prefix PATH : ${lib.makeBinPath pathDeps}
84
84
+
85
85
+
runHook postInstall
86
86
+
'';
87
87
+
88
88
+
meta = {
89
89
+
description = "Fill your console with Hollywood melodrama technobabble";
90
90
+
homepage = "https://a.hollywood.computer/";
91
91
+
license = lib.licenses.asl20;
92
92
+
maintainers = [ lib.maintainers.anselmschueler ];
93
93
+
};
94
94
+
}
+67
pkgs/applications/misc/hollywood/nixos-paths.patch
···
1
1
+
diff --git a/bin/hollywood b/bin/hollywood
2
2
+
index 6f1ee68..09bc4ea 100755
3
3
+
--- a/bin/hollywood
4
4
+
+++ b/bin/hollywood
5
5
+
@@ -74,7 +74,7 @@ if [ -z "$TMUX" ]; then
6
6
+
else
7
7
+
tmux_launcher=tmux
8
8
+
fi
9
9
+
- $tmux_launcher new-session -d -s $PKG "/bin/bash"
10
10
+
+ $tmux_launcher new-session -d -s $PKG "/usr/bin/env bash"
11
11
+
$tmux_launcher send-keys -t $PKG "$0 $1"
12
12
+
$tmux_launcher send-keys -t $PKG Enter
13
13
+
exec $tmux_launcher attach-session -t $PKG
14
14
+
diff --git a/lib/hollywood/code b/lib/hollywood/code
15
15
+
index 532ce73..3448447 100755
16
16
+
--- a/lib/hollywood/code
17
17
+
+++ b/lib/hollywood/code
18
18
+
@@ -19,7 +19,7 @@ command -v view >/dev/null 2>&1 || exit 1
19
19
+
20
20
+
trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
21
21
+
while true; do
22
22
+
- FILES=$(locate -l 4096 "/usr/*.java" "/usr/*.c" "/usr/*.cpp" 2>/dev/null | sort -R)
23
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
24
+
for f in $FILES; do
25
25
+
[ -r "$f" ] || continue
26
26
+
[ -s "$f" ] || continue
27
27
+
diff --git a/lib/hollywood/hexdump b/lib/hollywood/hexdump
28
28
+
index f2fb0bd..db059f5 100755
29
29
+
--- a/lib/hollywood/hexdump
30
30
+
+++ b/lib/hollywood/hexdump
31
31
+
@@ -19,8 +19,8 @@ command -v ccze >/dev/null 2>&1 || exit 1
32
32
+
33
33
+
trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
34
34
+
while true; do
35
35
+
- for f in $(ls /usr/bin/ | sort -R); do
36
36
+
- head -c 4096 "/usr/bin/$f" | hexdump -C | ccze -A -c default=green -c dir="bold green"
37
37
+
+ for f in $(find /usr/bin/ /run/current-system/sw/bin/ | sort -R); do
38
38
+
+ head -c 4096 "$f" | hexdump -C | ccze -A -c default=green -c dir="bold green"
39
39
+
sleep 0.7
40
40
+
done
41
41
+
done
42
42
+
diff --git a/lib/hollywood/jp2a b/lib/hollywood/jp2a
43
43
+
index e87b950..6541f80 100755
44
44
+
--- a/lib/hollywood/jp2a
45
45
+
+++ b/lib/hollywood/jp2a
46
46
+
@@ -19,7 +19,7 @@ command -v jp2a >/dev/null 2>&1 || exit 1
47
47
+
48
48
+
trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
49
49
+
while true; do
50
50
+
- FILES=$(locate -l 4096 "/usr/*jpg" 2>/dev/null | sort -R)
51
51
+
+ FILES=$(locate -l 4096 "/usr/*jpg" "/run/current-system/sw/*jpg" 2>/dev/null | sort -R)
52
52
+
for f in $FILES; do
53
53
+
[ -r "$f" ] || continue
54
54
+
[ -s "$f" ] || continue
55
55
+
diff --git a/lib/hollywood/man b/lib/hollywood/man
56
56
+
index 2d42513..f4d8bbb 100755
57
57
+
--- a/lib/hollywood/man
58
58
+
+++ b/lib/hollywood/man
59
59
+
@@ -19,7 +19,7 @@ command -v ccze >/dev/null 2>&1 || exit 1
60
60
+
61
61
+
trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
62
62
+
while true; do
63
63
+
- FILES=$(ls /usr/share/man/man1/ | sort -R | sed "s/\.1\.gz.*$//" | head -n 4096)
64
64
+
+ FILES=$(ls /usr/share/man/man1/ /run/current-system/sw/share/man/man1/ | sort -R | sed "s/\.1\.gz.*$//" | head -n 4096)
65
65
+
for f in $FILES; do
66
66
+
man "$f" | ccze -A
67
67
+
sleep 0.2
+4
pkgs/top-level/all-packages.nix
···
27011
27011
gtk = gtk3;
27012
27012
};
27013
27013
27014
27014
+
hollywood = callPackage ../applications/misc/hollywood {
27015
27015
+
inherit (python3Packages) pygments;
27016
27016
+
};
27017
27017
+
27014
27018
hors = callPackage ../development/tools/hors {
27015
27019
inherit (darwin.apple_sdk.frameworks) Security;
27016
27020
};