-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathshell.nix
More file actions
41 lines (35 loc) · 1.14 KB
/
shell.nix
File metadata and controls
41 lines (35 loc) · 1.14 KB
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
40
41
{ pkgs ? import <nixpkgs> {} }:
let
# Coq with CoqIDE.
coq-with-ide = pkgs.coq_9_1.override { buildIde = true; };
# Make "coqide" an alias for "rocqide".
coqide-alias = pkgs.writeShellScriptBin "coqide" ''
exec ${coq-with-ide}/bin/rocqide "$@"
'';
in
pkgs.mkShell
{
buildInputs = with pkgs;
[
coq-with-ide
coqide-alias
rocqPackages_9_1.stdlib
];
shellHook =
''
GREEN="\033[1;32m"
RESET="\033[0m"
export PROJECT_ROOT=$(pwd)
export PS1="\n\[''${GREEN}\]Cat\''${PWD#\''$PROJECT_ROOT}>\[''${RESET}\] "
echo ""
echo -e "Category theory in Coq"
echo ""
echo -e "''${GREEN}nix build''${RESET} — Build and install (requires Nix flakes)"
echo -e "''${GREEN}nix develop''${RESET} — Enter a Nix dev shell (requires Nix flakes)"
echo -e "''${GREEN}nix-shell''${RESET} — Enter a legacy Nix dev shell"
echo -e "''${GREEN}./build.sh''${RESET} — Regenerate the makefile, then build"
echo -e "''${GREEN}make''${RESET} — Build"
echo -e "''${GREEN}make clean''${RESET} — Clean build artifacts"
echo -e "''${GREEN}coqide''${RESET} — Start CoqIDE"
'';
}