blob: 973036efae3cf5197094fdcf511346cdc425e62e [file] [log] [blame]
Matthias Andreas Benkardf1683f52021-08-24 20:41:41 +02001/* Based on: https://github.com/srid/haskell-template */
2
3{
4 description = "Mulky Backups via Bupstash";
5
6 inputs = {
7 flake-utils.url = "github:numtide/flake-utils";
8 flake-compat = {
9 url = "github:edolstra/flake-compat";
10 flake = false;
11 };
12 };
13
14 outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
Matthias Andreas Benkard88446c52024-08-30 20:21:25 +020015 flake-utils.lib.eachDefaultSystem (system:
Matthias Andreas Benkardf1683f52021-08-24 20:41:41 +020016 let
17 overlays = [ ];
18
19 pkgs =
20 import nixpkgs { inherit system overlays; config.allowBroken = true; };
21
Matthias Andreas Benkardf1683f52021-08-24 20:41:41 +020022 project = returnShellEnv:
23 pkgs.haskellPackages.developPackage {
24 inherit returnShellEnv;
25
26 name = "mulkup";
27
28 root = pkgs.nix-gitignore.gitignoreSource [ ] ./.;
29
30 withHoogle = false;
31
32 overrides = self: super: with pkgs.haskell.lib; {
33 # Use callCabal2nix to override Haskell dependencies here
34 # cf. https://tek.brick.do/K3VXJd8mEKO7
Matthias Andreas Benkardf1683f52021-08-24 20:41:41 +020035 };
36
37 modifier = drv:
38 pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
39 [
40 cabal-fmt
41 cabal-install
42 ghcid
43 haskell-language-server
44 ormolu
45 ]);
46 };
47
48 in
49 {
50 defaultPackage = project false;
51 devShell = project true;
52 });
53}