-
Notifications
You must be signed in to change notification settings - Fork 13
/
shell.nix
35 lines (31 loc) · 1.12 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
let
pkgs = import (builtins.fetchGit {
url = "https://github.com/nixos/nixpkgs/";
ref = "refs/tags/24.05";
}) {};
clang = pkgs.clang_16;
llvm = pkgs.llvm_16;
gibbon_dir = builtins.toString ./.;
in
with pkgs;
# we are stuck with GCC 7 because Cilk was kicked out in GCC 8,
# OpenCilk needs packaging in nixpkgs, see
# https://github.com/NixOS/nixpkgs/issues/144256
mkShell.override { stdenv = pkgs.gcc7Stdenv; } {
# we use default Haskell toolchain supplied with the chosen nixpkgs; this way we hit their cache
inputsFrom = [ (pkgs.haskellPackages.callCabal2nix "gibbon-compiler" ./gibbon-compiler { }).env ];
name = "basicGibbonEnv";
buildInputs = [
# C/C++
clang llvm gcc7 boehmgc uthash
# Rust
rustc cargo
# Racket
racket
# Other utilities
stdenv ncurses unzip which rr rustfmt clippy ghcid gdb valgrind
];
shellHook = ''
export GIBBONDIR=${gibbon_dir}
'';
}