blob: 283ab0ee7f6392dcbb26d258614448015aab493f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
{ pkgs ? (import <nixpkgs> {})
, 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}"
'';
}
|