-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
71 lines (69 loc) · 2.45 KB
/
flake.nix
File metadata and controls
71 lines (69 loc) · 2.45 KB
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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?rev=c7eb65213bd7d95eafb8c5e2e181f04da103d054";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = inputs@{ self, nixpkgs, flake-utils, flake-compat, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
imports = [];
perSystem = { self', system, ... }:
let pkgs = import nixpkgs { inherit system; };
# t = pkgs.lib.trivial;
# hl = pkgs.haskell.lib;
# compiler = pkgs.haskell.packages."ghc94";
# project = runTests: executable-name: devTools: # [1]
# let addBuildTools = (t.flip hl.addBuildTools) devTools;
# addBuildDepends = (t.flip hl.addBuildDepends)
# [ ];
# doRunTests =
# if runTests then hl.doCheck else hl.dontCheck;
# in compiler.developPackage {
# root = pkgs.lib.sourceFilesBySuffices ./.
# [ ".cabal"
# ".hs"
# ".tel"
# "cases"
# "LICENSE"
# ];
# name = executable-name;
# source-overrides = {
# vty-crossplatform = dep/vty-crossplatform;
# telomare = dep/stand-in-language;
# };
# returnShellEnv = !(devTools == [ ]); # [2]
# modifier = (t.flip t.pipe) [
# addBuildDepends
# addBuildTools
# doRunTests
# # hl.dontHaddock
# ];
# };
release = (import ./release.nix { inherit pkgs system; }).${system}.ghc945;
in {
# packages.reflex-vty = project false "reflex-vty" [ ]; # [3]
# packages.default = self.packages.${system}.reflex-vty;
devShells.default = pkgs.mkShell {
name = "shell-ghc945";
# buildInputs = with pkgs; [
# cabal-install
# ghcid
# haskell-language-server
# hlint
# stylish-haskell
# ];
buildInputs = release.forShell;
inputsFrom = [
release.nixGhc.env
];
};
# checks = {
# build-and-tests = project true "telomare-with-tests" [ ];
# };
};
};
}