-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
60 lines (56 loc) · 2 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
{
description = "A very basic flake";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = {nixpkgs, flake-utils, ...}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {inherit system;};
ghcOverrides = hself: hsuper: {
polysemy = pkgs.haskell.lib.doJailbreak hsuper.polysemy_1_8_0_0;
polysemy-mocks = hsuper.callPackage ./default.nix {};
};
ghc942Pkgs = pkgs.haskell.packages.ghc942.override {
overrides = ghcOverrides;
};
ghc924Pkgs = pkgs.haskell.packages.ghc924.override {
overrides = ghcOverrides;
};
ghc902Pkgs = pkgs.haskell.packages.ghc902.override {
overrides = ghcOverrides;
};
ghc8107Pkgs = pkgs.haskell.packages.ghc8107.override {
overrides = ghcOverrides;
};
ghc884Pkgs = pkgs.haskell.packages.ghc884.override {
overrides = ghcOverrides;
};
shell = ghc924Pkgs.shellFor {
packages = p: [p.polysemy-mocks];
};
ghcWithPackages = shell.nativeBuildInputs ++ shell.buildInputs;
in rec {
packages = {
devEnv = pkgs.buildEnv {
name = "polysemy-mocks-dev-env";
paths = [
pkgs.haskell-language-server
pkgs.dhall
pkgs.dhall-json
pkgs.jq
pkgs.shellcheck
pkgs.fly
pkgs.cabal2nix
pkgs.cabal-install
pkgs.haskellPackages.hspec-discover
] ++ ghcWithPackages;
};
polysemy-mocks-ghc942 = ghc942Pkgs.polysemy-mocks;
polysemy-mocks-ghc924 = ghc924Pkgs.polysemy-mocks;
polysemy-mocks-ghc902 = ghc902Pkgs.polysemy-mocks;
polysemy-mocks-ghc8107 = ghc8107Pkgs.polysemy-mocks;
polysemy-mocks-ghc884 = ghc884Pkgs.polysemy-mocks;
};
defaultPackage = packages.devEnv;
});
}