forked from project-oak/silveroak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
48 lines (44 loc) · 974 Bytes
/
default.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
40
41
42
43
44
45
46
47
{ sources ? import ./nix/sources.nix
, pkgs ? import ./nix/packages.nix { inherit sources; }
, buildVerilator ? true
}:
let
tools = with pkgs; [
# Building
coq_8_12
(haskell.packages.ghc8104.ghcWithPackages (pkgs: with pkgs; [Cabal]))
# Common tools
gcc
git
gnumake
stdenv
coreutils
findutils
bash
binutils.bintools
] ++
# Verilator optional for parallel building
# TODO(blaxill): Perhaps build verilator separately and don't make optional
# here
(if buildVerilator then [pkgs.verilator] else [])
;
in
rec {
cava-shell = pkgs.mkShell {
name = "cava-shell";
buildInputs = tools;
};
docker-image-build = pkgs.dockerTools.buildLayeredImage {
name = "gcr.io/oak-ci/oak-hardware";
tag = "latest";
contents = tools;
config = {
WorkingDir = "/workspace";
Volumes = {
"/workspace" = {};
"/tmp" = {};
};
};
maxLayers = 120;
};
}