forked from llvm-hs/llvm-hs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
33 lines (31 loc) · 1.05 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
let
default_nixpkgs = (import <nixpkgs> {}).fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "5acbe81573523cf3e64d37b03539d7083459ac42";
sha256 = "0w0i88cdff89spzplhx546cdm5ijyka6q57f67569gk9xk84dcy4";
};
in
{ nixpkgs ? <nixpkgs>
, compiler ? "ghc863" }:
let
hsOverlay = self: super: {
llvm_8 = super.llvm_8.override { debugVersion = true; };
haskell = super.haskell // {
packages = super.haskell.packages // {
"${compiler}" = super.haskell.packages."${compiler}".override {
overrides = haskellSelf: haskellSuper: {
llvm-hs = haskellSuper.callCabal2nix "llvm-hs" ./llvm-hs { llvm-config = self.llvm_8; };
llvm-hs-pure = haskellSuper.callCabal2nix "llvm-hs-pure" ./llvm-hs-pure {};
};
};
};
};
};
orig_pkgs = import nixpkgs {};
pkgs = import orig_pkgs.path { overlays = [ hsOverlay ]; };
in
pkgs.haskell.packages."${compiler}".shellFor {
packages = pkgs: with pkgs; [llvm-hs llvm-hs-pure];
nativeBuildInputs = with pkgs; [ llvm_7 gdb lldb ];
}