diff options
Diffstat (limited to 'ws2015/ffp/presentation/shell.nix')
-rw-r--r-- | ws2015/ffp/presentation/shell.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ws2015/ffp/presentation/shell.nix b/ws2015/ffp/presentation/shell.nix new file mode 100644 index 0000000..283ab0e --- /dev/null +++ b/ws2015/ffp/presentation/shell.nix | |||
@@ -0,0 +1,36 @@ | |||
1 | { pkgs ? (import <nixpkgs> {}) | ||
2 | , haskellPackages ? (import ./thermoprint.git/default.nix {}).haskellPackages | ||
3 | }: | ||
4 | |||
5 | let | ||
6 | thermoprintPackages = builtins.attrValues (import ./thermoprint.git/default.nix {}); | ||
7 | ghc = haskellPackages.ghcWithPackages | ||
8 | (ps: thermoprintPackages ++ utilities ps ++ testDeps ps); | ||
9 | utilities = (ps: with ps; [ ]); | ||
10 | testDeps = (ps: with ps; [ ]); | ||
11 | shell = pkgs.stdenv.mkDerivation { | ||
12 | name = "shell"; | ||
13 | src = builtins.toFile "shell.sh" '' | ||
14 | #!/usr/bin/env zsh | ||
15 | |||
16 | typeset -a args | ||
17 | args=($@) | ||
18 | [[ $#@ -eq 0 ]] && args=("-e" "tmux") | ||
19 | |||
20 | exec urxvtc -bg white -fg black -fn "xft:DejaVu Sans Mono:pixelsize=20" $args | ||
21 | ''; | ||
22 | phases = ["installPhase"]; | ||
23 | installPhase = '' | ||
24 | mkdir -p $out/bin | ||
25 | install -m 555 $src $out/bin/shell | ||
26 | ''; | ||
27 | }; | ||
28 | in | ||
29 | pkgs.stdenv.mkDerivation rec { | ||
30 | name = "presentation-env"; | ||
31 | buildInputs = [ shell ghc ] ++ (with pkgs; [ pdfpc screen-message ]); | ||
32 | shellHook = '' | ||
33 | eval $(egrep ^export ${ghc}/bin/ghc) | ||
34 | export PROMPT_INFO="${name}" | ||
35 | ''; | ||
36 | } | ||