|
7 | 7 | };
|
8 | 8 |
|
9 | 9 | outputs = { self, nixpkgs, flake-utils }:
|
10 |
| - flake-utils.lib.eachDefaultSystem |
11 |
| - (system: |
12 |
| - let |
13 |
| - pkgs = nixpkgs.legacyPackages.${system}; |
14 |
| - |
15 |
| - jailbreakUnbreak = pkg: |
16 |
| - pkgs.haskell.lib.doJailbreak (pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.unmarkBroken pkg)); |
17 |
| - |
18 |
| - haskellPackages = pkgs.haskell.packages.ghc925.override |
19 |
| - { |
20 |
| - overrides = hself: hsuper: { |
21 |
| - Cabal-syntax = hsuper.Cabal-syntax_3_8_1_0; |
22 |
| - }; |
23 |
| - }; |
24 |
| - in |
25 |
| - rec |
26 |
| - { |
27 |
| - packages.hsec-tools = |
28 |
| - haskellPackages.callCabal2nix "hsec-tools" ./. { |
29 |
| - # Dependency overrides go here |
| 10 | + flake-utils.lib.eachDefaultSystem (system: |
| 11 | + let |
| 12 | + overlays = [ ]; |
| 13 | + pkgs = |
| 14 | + import nixpkgs { inherit system overlays; config.allowBroken = true; }; |
| 15 | + project = returnShellEnv: |
| 16 | + pkgs.haskellPackages.developPackage { |
| 17 | + inherit returnShellEnv; |
| 18 | + name = "hsec-tools"; |
| 19 | + root = ./.; |
| 20 | + withHoogle = false; |
| 21 | + overrides = self: super: with pkgs.haskell.lib; { |
30 | 22 | };
|
31 |
| - |
32 |
| - defaultPackage = packages.hsec-tools; |
33 |
| - |
34 |
| - devShell = |
35 |
| - pkgs.mkShell { |
36 |
| - buildInputs = with haskellPackages; [ |
37 |
| - haskell-language-server |
38 |
| - ghcid |
| 23 | + modifier = drv: |
| 24 | + pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages; |
| 25 | + [ |
| 26 | + cabal-fmt |
39 | 27 | cabal-install
|
40 |
| - ]; |
41 |
| - inputsFrom = [ |
42 |
| - self.defaultPackage.${system}.env |
43 |
| - ]; |
44 |
| - }; |
| 28 | + ghcid |
| 29 | + haskell-language-server |
| 30 | + pkgs.nixpkgs-fmt |
| 31 | + ]); |
| 32 | + }; |
| 33 | + in |
| 34 | + { |
| 35 | + # Used by `nix build` & `nix run` (prod exe) |
| 36 | + defaultPackage = project true; |
| 37 | + |
| 38 | + # Used by `nix develop` (dev shell) |
| 39 | + devShell = project true; |
45 | 40 | });
|
46 | 41 | }
|
0 commit comments