-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
52 lines (44 loc) · 1.16 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
# SPDX-FileCopyrightText: 2022 Google LLC
#
# SPDX-License-Identifier: Apache-2.0
{ pkgs ? import nix/nixpkgs.nix {} }:
pkgs.mkShell {
name = "shell";
buildInputs =
[
pkgs.gcc
pkgs.pkg-config
pkgs.sbt
pkgs.scala
pkgs.verilator
# Haskell toolchain
pkgs.cabal-install
# pkgs.haskell.compiler.ghc90
# pkgs.haskell.compiler.ghc92
pkgs.haskell.compiler.ghc94
# pkgs.haskell.compiler.ghc96
(pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)
# VexRiscV needs a special openocd
pkgs.openocd-vexriscv
pkgs.gdb
# For Cabal to clone git repos
pkgs.git
# For upgrading Nix env. To update dependencies (within bounds of the currently
# tracking NixOS version) use:
#
# niv update
#
# If you want to upgrade nixpkgs to another NixOS version, use:
#
# niv update nixpkgs -b nixos-23.11
#
pkgs.niv
]
;
shellHook = ''
# Prevents Perl warnings
export LC_ALL="C.UTF-8";
# Mixing Nix Cabal and non-Nix Cabal yields some weird linking errors.
export CABAL_DIR="$HOME/.cabal-nix";
'';
}