-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
39 lines (34 loc) · 938 Bytes
/
shell.nix
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
37
38
39
{ pkgs ? import
<nixpkgs>
{}
, projmdDir ? null
}:
with pkgs;
let
pmdmini = /* enableDebugging broken, see https://github.com/NixOS/nixpkgs/issues/136756 */ (callPackage ./cfg/pmdmini.nix { });
projmd_scripts = callPackage ./cfg/scripts.nix {
pmdmini = pmdmini;
};
in
mkShell {
buildInputs = [
projmd_scripts
];
shellHook = ''
cat ${./banner.txt}
echo ""
export PROJMD_BASE=${if projmdDir != null then projmdDir else "$(realpath .)"}
echo "=== Set ProjMD base directory ==="
echo "-> PROJMD_BASE='$PROJMD_BASE'"
echo ""
echo "! If this is incorrect, either do"
echo "! cd /path/to/projmd"
echo "! before entering the nix-shell or pass"
echo "! --argstr projmdDir /path/to/projmd"
echo "! to your nix-shell invocation!"
echo ""
export SDL_VIDEODRIVER=dummy
echo "=== Set SDL dummy driver ==="
echo "-> SDL_VIDEODRIVER='$SDL_VIDEODRIVER'"
'';
}