From d2357f71e3d50becd78c1d5da05f0c02ce5f98d9 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 7 Mar 2016 15:08:21 +0100 Subject: pdfpc alias --- ws2015/ffp/presentation/shell.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'ws2015') 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 install -m 555 $src $out/bin/shell ''; }; + present = pkgs.stdenv.mkDerivation { + name = "present"; + src = builtins.toFile "present.sh" '' + #!/usr/bin/env zsh + + typeset -a args + args=($@) + [[ $#@ -eq 0 ]] && args=("presentation.pdf") + + exec pdfpc -g -n right -d 20 $args + ''; + phases = ["installPhase"]; + installPhase = '' + mkdir -p $out/bin + install -m 555 $src $out/bin/present + ''; + }; in pkgs.stdenv.mkDerivation rec { name = "presentation-env"; - buildInputs = [ shell ghc ] ++ (with pkgs; [ pdfpc screen-message ]); + buildInputs = [ shell present ghc ] ++ (with pkgs; [ screen-message pdfpc ]); shellHook = '' eval $(egrep ^export ${ghc}/bin/ghc) export PROMPT_INFO="${name}" -- cgit v1.2.3