blob: 1da1d8f58a4686d35948939af817fa11cd00f86c [file] [log] [blame]
Skyler Turnerb8a61992022-03-15 10:32:51 +00001final: prev: let
Skyler Turnerb85d1822022-03-15 10:33:51 +00002 hollywood = final.stdenv.mkDerivation {
Skyler Turnerb8a61992022-03-15 10:32:51 +00003 name = "hollywood-1.7";
4
Skyler Turner634a3cd2022-03-15 10:35:21 +00005 src = final.fetchgit {
Skyler Turnerb8a61992022-03-15 10:32:51 +00006 url = https://github.com/dustinkirkland/hollywood.git;
7 rev = "58e1e15e6f02cb05c2cad8163c27dabc98e3f19f";
8 sha256 = "4a0e4d499bd00da76f17c35518dee56c5eecd6c9a582f26bd52d119505e3f61a";
9 };
10
Skyler Turner45c8fba2022-03-15 10:35:09 +000011 buildInputs = [ final.makeWrapper ];
Skyler Turnerb8a61992022-03-15 10:32:51 +000012
13 patchPhase = ''
14 substituteInPlace bin/hollywood \
Skyler Turner45c8fba2022-03-15 10:35:09 +000015 --replace /bin/bash ${final.bash}/bin/bash
Skyler Turnerb8a61992022-03-15 10:32:51 +000016 '';
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 '';
Skyler Turner6bf66562022-03-15 10:33:24 +000040 };
Skyler Turnerb8a61992022-03-15 10:32:51 +000041in {
42 hollywood = hollywood;
43}