-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathflake.nix
More file actions
65 lines (59 loc) · 1.5 KB
/
Copy pathflake.nix
File metadata and controls
65 lines (59 loc) · 1.5 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
description = "Iris tutorial development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
devShells.${system}.default = pkgs.mkShell {
buildInputs = with pkgs; [
# OPAM tool and build dependencies
opam
gmp
pkg-config
rsync
unzip
patch
# Rocq & language server (Commented out because installed via opam)
# rocq-core
# rocqPackages.stdlib
# rocqPackages.stdpp
# rocqPackages.iris
# rocqPackages.vsrocq-language-server
gawk
git
];
shellHook = ''
# Automatically load opam environment variables if an opam switch exists
eval $(opam env 2>/dev/null)
'';
};
checks.${system}.default = pkgs.stdenv.mkDerivation {
name = "iris-tutorial-check";
src = ./.;
nativeBuildInputs = with pkgs; [
rocq-core
rocqPackages.stdlib
rocqPackages.stdpp
rocqPackages.iris
gawk
git
];
buildPhase = ''
make -j$NIX_BUILD_CORES all
make exercises
make html
'';
installPhase = ''
mkdir -p $out/share/doc
cp -r html $out/share/doc/html
touch $out/done
'';
};
};
}