From bc715c300fe70c39e4b598c908070475626e24fe Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 6 Mar 2016 20:22:12 +0100 Subject: Draft of FFP presentation --- ws2015/ffp/presentation/shell.nix | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 ws2015/ffp/presentation/shell.nix (limited to 'ws2015/ffp/presentation/shell.nix') 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 @@ +{ pkgs ? (import {}) +, haskellPackages ? (import ./thermoprint.git/default.nix {}).haskellPackages +}: + +let + thermoprintPackages = builtins.attrValues (import ./thermoprint.git/default.nix {}); + ghc = haskellPackages.ghcWithPackages + (ps: thermoprintPackages ++ utilities ps ++ testDeps ps); + utilities = (ps: with ps; [ ]); + testDeps = (ps: with ps; [ ]); + shell = pkgs.stdenv.mkDerivation { + name = "shell"; + src = builtins.toFile "shell.sh" '' + #!/usr/bin/env zsh + + typeset -a args + args=($@) + [[ $#@ -eq 0 ]] && args=("-e" "tmux") + + exec urxvtc -bg white -fg black -fn "xft:DejaVu Sans Mono:pixelsize=20" $args + ''; + phases = ["installPhase"]; + installPhase = '' + mkdir -p $out/bin + install -m 555 $src $out/bin/shell + ''; + }; +in +pkgs.stdenv.mkDerivation rec { + name = "presentation-env"; + buildInputs = [ shell ghc ] ++ (with pkgs; [ pdfpc screen-message ]); + shellHook = '' + eval $(egrep ^export ${ghc}/bin/ghc) + export PROMPT_INFO="${name}" + ''; +} -- cgit v1.2.3