-
Notifications
You must be signed in to change notification settings - Fork 2
/
default.nix
86 lines (83 loc) · 2.98 KB
/
default.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
# compiler ? "ghc884"
# compiler ? "ghc8107"
# compiler ? "ghc902"
# compiler ? "ghc922"
# compiler ? "ghc924"
# compiler ? "ghc925" # listlike-tests are extremely slow
# compiler ? "ghc926" # not yet
# compiler ? "ghc942"
# compiler ? "ghc943"
} :
let
config = {
packageOverrides = pkgs: rec {
haskellPackages = pkgs.haskellPackages.override {
# haskellPackages = pkgs.haskell.packages.${compiler}.override {
/* overrides = haskellPackagesNew: haskellPackagesOld: rec { */
overrides = self: super: rec {
# ghc = super.ghc;
# ghc = super.ghc // { withPackages = super.ghc.withHoogle; };
# ghcWithPackages = self.ghc.withPackages;
# mkDerivation = args: super.mkDerivation (args // {
# enableLibraryProfiling = true;
# });
first-class-families = self.callCabal2nix "first-class-families"
# ~/gito/first-class-families {};
(pkgs.fetchFromGitHub { # 0.8.0.1
owner = "Lysxia";
repo = "first-class-families";
rev = "933c2527de9bfcb162e0eebcbcdac4f28a39bd3b";
sha256 = "0k66s3bg71pm890zgr5w88zv7vcrxfwd74c0dcn945k91nzn41b2";
}) {};
# (pkgs.fetchFromGitHub { # 0.8.0.1
# owner = "Lysxia";
# repo = "first-class-families";
# rev = "d4780864ed9b11343b7b26050e39b2048a8e61f6";
# sha256 = "1iw0dryz66z4k9lsj1kayf17xs38i8bdk9aqi2qz49vcbhnfw8pd";
# }) {};
# something for the next version?
# rev = "9fe4ce36cf1cd4b0f5af59c923c15b9085c48cd6";
# sha256 = "1677ylhhf1mwwfs6j2p6gbn2f6mzsx4zmaihz8v9v07h845wz8l7";
# 0.8.0
# rev = "4a0bf3ea9c125bb4009b61ce70b1a5339b7b2072";
# sha256 = "14387mpfvds226iynkpay3aaqamvxznxjsmg2qcwdxafdvxmyq9z";
# (pkgs.fetchFromGitHub { # 0.7
# owner = "Lysxia";
# repo = "first-class-families";
# rev = "120e41ea3831b9ffad62239e109c1b2a0aaf269f";
# sha256 = "0pyxpnkgr2rgn83whl37jh7k3rdr5hiprdmfkswwj7c1nhl1ky5i";
# }) {};
};
};
};
allowUnfree = true;
};
nixpkgs = import <nixpkgs> { inherit config; };
pkgs = nixpkgs.pkgs;
hpkgs = pkgs.haskellPackages;
# hpkgs = pkgs.haskell.packages.${compiler};
adjust-for-ghc = drv: {
executableSystemDepends = [
hpkgs.ghcid
# hpkgs.ghcide
hpkgs.haskell-language-server
hpkgs.cabal-install
];
buildDepends = [
hpkgs.hlint
# hpkgs.ghc-mod
# hpkgs.hasktags
# hpkgs.haskdogs # stack config set system-ghc --global true
# hpkgs.hindent
# hpkgs.hsimport
# hpkgs.pointfree
# hpkgs.pointful
# hpkgs.stylish-haskell
];
};
adjust = adjust-for-ghc;
exe-code-base = hpkgs.callCabal2nix "fcf-containers" ./. {};
exe-code = pkgs.haskell.lib.overrideCabal exe-code-base adjust;
in
exe-code