Skyler Turner | b8a6199 | 2022-03-15 10:32:51 +0000 | [diff] [blame] | 1 | final: prev: let |
Skyler Turner | b85d182 | 2022-03-15 10:33:51 +0000 | [diff] [blame] | 2 | hollywood = final.stdenv.mkDerivation { |
Skyler Turner | b8a6199 | 2022-03-15 10:32:51 +0000 | [diff] [blame] | 3 | name = "hollywood-1.7"; |
| 4 | |
Skyler Turner | 634a3cd | 2022-03-15 10:35:21 +0000 | [diff] [blame] | 5 | src = final.fetchgit { |
Skyler Turner | b8a6199 | 2022-03-15 10:32:51 +0000 | [diff] [blame] | 6 | url = https://github.com/dustinkirkland/hollywood.git; |
| 7 | rev = "58e1e15e6f02cb05c2cad8163c27dabc98e3f19f"; |
| 8 | sha256 = "4a0e4d499bd00da76f17c35518dee56c5eecd6c9a582f26bd52d119505e3f61a"; |
| 9 | }; |
| 10 | |
Skyler Turner | 45c8fba | 2022-03-15 10:35:09 +0000 | [diff] [blame] | 11 | buildInputs = [ final.makeWrapper ]; |
Skyler Turner | b8a6199 | 2022-03-15 10:32:51 +0000 | [diff] [blame] | 12 | |
| 13 | patchPhase = '' |
| 14 | substituteInPlace bin/hollywood \ |
Skyler Turner | 45c8fba | 2022-03-15 10:35:09 +0000 | [diff] [blame] | 15 | --replace /bin/bash ${final.bash}/bin/bash |
Skyler Turner | b8a6199 | 2022-03-15 10:32:51 +0000 | [diff] [blame] | 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 | ''; |
Skyler Turner | 6bf6656 | 2022-03-15 10:33:24 +0000 | [diff] [blame] | 40 | }; |
Skyler Turner | b8a6199 | 2022-03-15 10:32:51 +0000 | [diff] [blame] | 41 | in { |
| 42 | hollywood = hollywood; |
| 43 | } |