blob: de73fca6b3bbb44d5b896a0e6b39b011c02e2da0 [file] [log] [blame]
Skyler Turnerb8a61992022-03-15 10:32:51 +00001final: prev: let
2 hollywood = stdenv.mkDerivation {
3 name = "hollywood-1.7";
4
5 src = fetchgit {
6 url = https://github.com/dustinkirkland/hollywood.git;
7 rev = "58e1e15e6f02cb05c2cad8163c27dabc98e3f19f";
8 sha256 = "4a0e4d499bd00da76f17c35518dee56c5eecd6c9a582f26bd52d119505e3f61a";
9 };
10
11 buildInputs = [ makeWrapper ];
12
13 patchPhase = ''
14 substituteInPlace bin/hollywood \
15 --replace /bin/bash ${bash}/bin/bash
16 '';
17
18 installPhase = ''
19 # Create the output directory and copy the core files into that
20 # directory.
21 mkdir -p $out
22 cp -R bin share $out
23 # Only install the supported plugins.
24 mkdir -p $out/lib/hollywood
25 cp lib/hollywood/apg $out/lib/hollywood
26 cp lib/hollywood/bmon $out/lib/hollywood
27 cp lib/hollywood/cmatrix $out/lib/hollywood
28 cp lib/hollywood/hexdump $out/lib/hollywood
29 cp lib/hollywood/htop $out/lib/hollywood
30 cp lib/hollywood/logs $out/lib/hollywood
31 cp lib/hollywood/mplayer $out/lib/hollywood
32 cp lib/hollywood/sshart $out/lib/hollywood
33 cp lib/hollywood/stat $out/lib/hollywood
34 cp lib/hollywood/tree $out/lib/hollywood
35 # Wrap `hollywood` so that it has the paths to all of the tools
36 # required by the plugins (and hollywood itself).
37 wrapProgram $out/bin/hollywood \
38 --suffix-each PATH : "${final.apg}/bin ${final.bmon}/bin ${final.byobu}/bin ${final.ccze}/bin ${final.cmatrix}/bin ${final.htop}/bin ${final.mplayer}/bin ${final.openssh}/bin ${final.tmux}/bin ${final.tree}/bin"
39 '';
40 }
41in {
42 hollywood = hollywood;
43}