-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
72 lines (63 loc) · 2.24 KB
/
flake.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
{
description = "Data structures and algorithms for first-class-families";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nix-filter.url = "github:numtide/nix-filter/master";
};
outputs = { self, nixpkgs, nix-filter }:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
# filter = import nix-filter { };
ghcVersion = "925";
# ghcVersion = "92";
# ghcVersion = "902";
src = nix-filter.lib {
root = ./.;
include = [
(nix-filter.lib.inDirectory "src")
(nix-filter.lib.inDirectory "examples")
(nix-filter.lib.inDirectory "test")
(nix-filter.lib.matchExt "hs")
./fcf-containers.cabal
./cabal.project
./LICENSE
];
};
fcf-containers = hself: hself.callCabal2nix "fcf-containers" src {};
myHaskellPackages = pkgs.haskell.packages."ghc${ghcVersion}".override {
overrides = hself: hsuper: {
# fcf-containers = hself.callCabal2nix "fcf-containers" sources.fcf-containers {};
# fcf-containers = (import sources.fcf-containers {});
fcf-containers = fcf-containers hself;
# ListLike = pkgs.haskell.lib.dontCheck hsuper.ListLike;
# type-of-html = pkgs.haskell.lib.doBenchmark (hself.callPackage ./nix/type-of-html.nix {inherit src;});
# type-of-html = hself.callCabal2nix "type-of-html" src {};
# optics-core = hsuper.optics-core.overrideAttrs(old: {
# configureFlags = "-f explicit-generic-labels";
# patches = [./optics-core.patch];
# });
};
};
shell = myHaskellPackages.shellFor {
packages = p: [
p.fcf-containers
];
buildInputs = with pkgs.haskell.packages."ghc${ghcVersion}"; [
myHaskellPackages.cabal-install
ghcid
(pkgs.haskell-language-server.override { supportedGhcVersions = [ "${ghcVersion}" ]; })
hlint
# implicit-hie
# cabal2nix
];
withHoogle = true;
doBenchmark = true;
};
in
{
library = fcf-containers;
# packages.x86_64-linux.default = ;
devShell.x86_64-linux = shell;
inherit pkgs;
};
}