diff options
-rw-r--r-- | ws2015/ffp/presentation/shell.nix | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/ws2015/ffp/presentation/shell.nix b/ws2015/ffp/presentation/shell.nix index 283ab0e..2f98400 100644 --- a/ws2015/ffp/presentation/shell.nix +++ b/ws2015/ffp/presentation/shell.nix | |||
@@ -25,10 +25,27 @@ let | |||
25 | install -m 555 $src $out/bin/shell | 25 | install -m 555 $src $out/bin/shell |
26 | ''; | 26 | ''; |
27 | }; | 27 | }; |
28 | present = pkgs.stdenv.mkDerivation { | ||
29 | name = "present"; | ||
30 | src = builtins.toFile "present.sh" '' | ||
31 | #!/usr/bin/env zsh | ||
32 | |||
33 | typeset -a args | ||
34 | args=($@) | ||
35 | [[ $#@ -eq 0 ]] && args=("presentation.pdf") | ||
36 | |||
37 | exec pdfpc -g -n right -d 20 $args | ||
38 | ''; | ||
39 | phases = ["installPhase"]; | ||
40 | installPhase = '' | ||
41 | mkdir -p $out/bin | ||
42 | install -m 555 $src $out/bin/present | ||
43 | ''; | ||
44 | }; | ||
28 | in | 45 | in |
29 | pkgs.stdenv.mkDerivation rec { | 46 | pkgs.stdenv.mkDerivation rec { |
30 | name = "presentation-env"; | 47 | name = "presentation-env"; |
31 | buildInputs = [ shell ghc ] ++ (with pkgs; [ pdfpc screen-message ]); | 48 | buildInputs = [ shell present ghc ] ++ (with pkgs; [ screen-message pdfpc ]); |
32 | shellHook = '' | 49 | shellHook = '' |
33 | eval $(egrep ^export ${ghc}/bin/ghc) | 50 | eval $(egrep ^export ${ghc}/bin/ghc) |
34 | export PROMPT_INFO="${name}" | 51 | export PROMPT_INFO="${name}" |