-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell-stack.nix
63 lines (60 loc) · 1.39 KB
/
shell-stack.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
53
54
55
56
57
58
59
60
61
62
63
{ withHoogle ? false
, compiler ? "ghc8101"
}:
let
fetchFromGitHub = { owner, repo, rev, sha256, branch }:
builtins.fetchTarball {
inherit sha256;
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
};
config = {
doCheck = false;
allowBroken = true;
packageOverrides = pkgs: rec {
haskellPackages = pkgs.haskell.packages.ghc8101.override {
overrides = (self: super: {
stack = pkgs.haskellPackages.callCabal2nix "stack" (
builtins.fetchTarball {
url = "https://github.com/commercialhaskell/stack/archive/9dcef52902d01646d63fe76fc8e6b1b3ac6cc9b8.tar.gz";
sha256 = "0xyiaj3z0hm4zdkdird5296q5r9lb5dpqlm4352z9kglksq66k63";
}){};
});
};
};
};
npkgs = (import ./nixpkgs {inherit config;});
pkgs = npkgs.pkgs;
ghc = pkgs.haskellPackages.ghcWithPackages (pkgs: with pkgs; [
GenericPretty
QuickCheck
alex
ansi
fgl
happy
hashable
inline
json
language
lens
parsers
prettyprinter
random
raw
split
uniplate
unordered
vector
]);
this = rec {
inherit pkgs ghc;
};
project =
pkgs.haskell.lib.buildStackProject {
name = "inline-fortran";
buildInputs = with pkgs; [ git protobuf zlib gcc.cc gfortran gfortran.cc haskellPackages.happy haskellPackages.alex gdb
];
doHaddock = false;
doCheck = false;
};
in
this // project