Matthias Andreas Benkard | f1683f5 | 2021-08-24 20:41:41 +0200 | [diff] [blame] | 1 | /* 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 Benkard | 88446c5 | 2024-08-30 20:21:25 +0200 | [diff] [blame] | 15 | flake-utils.lib.eachDefaultSystem (system: |
Matthias Andreas Benkard | f1683f5 | 2021-08-24 20:41:41 +0200 | [diff] [blame] | 16 | let |
| 17 | overlays = [ ]; |
| 18 | |
| 19 | pkgs = |
| 20 | import nixpkgs { inherit system overlays; config.allowBroken = true; }; |
| 21 | |
Matthias Andreas Benkard | f1683f5 | 2021-08-24 20:41:41 +0200 | [diff] [blame] | 22 | 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 Benkard | f1683f5 | 2021-08-24 20:41:41 +0200 | [diff] [blame] | 35 | }; |
| 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 | } |