-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
29 lines (26 loc) · 802 Bytes
/
shell.nix
File metadata and controls
29 lines (26 loc) · 802 Bytes
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
let
pkgs = import <nixpkgs> {};
# Fetch GRIN from fuselang/grin flake with Boehm GC support
grinFlake = builtins.getFlake "github:fuselang/grin/boehm-gc";
grin = grinFlake.packages.${builtins.currentSystem}.default;
# Import LLVM 15 from nixos-23.11 (same as grin flake)
pkgs-23-11 = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/nixos-23.11.tar.gz";
}) {};
llvm15 = pkgs-23-11.llvmPackages_15;
in
pkgs.mkShell {
buildInputs = [
grin
pkgs.boehmgc
llvm15.clang
llvm15.llvm
];
shellHook = ''
export GC_INCLUDE="${pkgs.boehmgc}/include"
export GC_LIB="${pkgs.boehmgc}/lib"
export GRIN_CC="${llvm15.clang}/bin/clang"
export GRIN_OPT="${llvm15.llvm}/bin/opt"
export GRIN_LLC="${llvm15.llvm}/bin/llc"
'';
}