|
2 | 2 | description = "cardano-cli";
|
3 | 3 |
|
4 | 4 | inputs = {
|
5 |
| - haskellNix.url = "github:input-output-hk/haskell.nix"; |
| 5 | + hackageNix = { |
| 6 | + url = "github:input-output-hk/hackage.nix"; |
| 7 | + flake = false; |
| 8 | + }; |
| 9 | + haskellNix = { |
| 10 | + url = "github:input-output-hk/haskell.nix?ref=2024.09.15"; |
| 11 | + inputs.hackage.follows = "hackageNix"; |
| 12 | + }; |
6 | 13 | nixpkgs.follows = "haskellNix/nixpkgs-unstable";
|
7 | 14 | iohkNix.url = "github:input-output-hk/iohk-nix";
|
8 | 15 | incl.url = "github:divnix/incl";
|
9 | 16 | flake-utils.url = "github:hamishmack/flake-utils/hkm/nested-hydraJobs";
|
10 | 17 |
|
11 |
| - CHaP.url = "github:intersectmbo/cardano-haskell-packages?ref=repo"; |
12 |
| - CHaP.flake = false; |
| 18 | + CHaP = { |
| 19 | + url = "github:intersectmbo/cardano-haskell-packages?ref=repo"; |
| 20 | + flake = false; |
| 21 | + }; |
13 | 22 | };
|
14 | 23 |
|
15 | 24 | outputs = inputs: let
|
|
23 | 32 | # see flake `variants` below for alternative compilers
|
24 | 33 | defaultCompiler = "ghc982";
|
25 | 34 | haddockShellCompiler = defaultCompiler;
|
26 |
| - mingwVersion = "ghc965"; # Used for cross compilation, and so referenced in .github/workflows/release-upload.yml. Adapt the latter if you change this value. |
27 |
| - cabalHeadOverlay = final: prev: { |
28 |
| - cabal-head = |
29 |
| - (final.haskell-nix.cabalProject { |
30 |
| - # cabal master commit containing https://github.com/haskell/cabal/pull/8726 |
31 |
| - # this fixes haddocks generation |
32 |
| - src = final.fetchFromGitHub { |
33 |
| - owner = "haskell"; |
34 |
| - repo = "cabal"; |
35 |
| - rev = "6eaba73ac95c62f8dc576e227b5f9c346910303c"; |
36 |
| - hash = "sha256-Uu/w6AK61F7XPxtKe+NinuOR4tLbaT6rwxVrQghDQjo="; |
37 |
| - }; |
38 |
| - index-state = "2024-07-03T00:00:00Z"; |
39 |
| - compiler-nix-name = haddockShellCompiler; |
40 |
| - cabalProject = '' |
41 |
| - packages: Cabal-syntax Cabal cabal-install-solver cabal-install |
42 |
| - ''; |
43 |
| - configureArgs = "--disable-benchmarks --disable-tests"; |
44 |
| - }) |
45 |
| - .cabal-install |
46 |
| - .components |
47 |
| - .exes |
48 |
| - .cabal; |
49 |
| - }; |
| 35 | + crossCompilerVersion = "ghc966"; # Used for cross compilation, and so referenced in .github/workflows/release-upload.yml. Adapt the latter if you change this value. |
50 | 36 | in
|
51 | 37 | {inherit (inputs) incl;}
|
52 | 38 | // inputs.flake-utils.lib.eachSystem supportedSystems (
|
|
61 | 47 | inputs.haskellNix.overlay
|
62 | 48 | # configure haskell.nix to use iohk-nix crypto librairies.
|
63 | 49 | inputs.iohkNix.overlays.haskell-nix-crypto
|
64 |
| - cabalHeadOverlay |
65 | 50 | ];
|
66 | 51 | inherit system;
|
67 | 52 | inherit (inputs.haskellNix) config;
|
|
88 | 73 |
|
89 | 74 | # we also want cross compilation to windows on linux (and only with default compiler).
|
90 | 75 | crossPlatforms = p:
|
91 |
| - lib.optionals (system == "x86_64-linux" && config.compiler-nix-name == mingwVersion) |
| 76 | + lib.optionals (system == "x86_64-linux" && config.compiler-nix-name == crossCompilerVersion) |
92 | 77 | [
|
93 | 78 | p.mingwW64 # x86_64-windows
|
94 | 79 | p.aarch64-multiplatform-musl # aarch64-linux (static)
|
|
107 | 92 | # tools we want in our shell, from hackage
|
108 | 93 | shell.tools =
|
109 | 94 | {
|
110 |
| - # for now we're using latest cabal for `cabal haddock-project` fixes |
111 |
| - # cabal = "3.10.3.0"; |
| 95 | + cabal = "3.14.1.1"; |
112 | 96 | ghcid = "0.8.8";
|
113 | 97 | }
|
114 | 98 | // lib.optionalAttrs (config.compiler-nix-name == defaultCompiler) {
|
|
120 | 104 | stylish-haskell = "0.14.6.0";
|
121 | 105 | };
|
122 | 106 | # and from nixpkgs or other inputs
|
123 |
| - shell.nativeBuildInputs = with nixpkgs; [gh jq yq-go actionlint shellcheck cabal-head] ++ (lib.optional isDarwin macOS-security); |
| 107 | + shell.nativeBuildInputs = with nixpkgs; [gh jq yq-go actionlint shellcheck] ++ (lib.optional isDarwin macOS-security); |
124 | 108 | # disable Hoogle until someone request it
|
125 | 109 | shell.withHoogle = false;
|
126 | 110 | # Skip cross compilers for the shell
|
|
191 | 175 | flake = cabalProject.flake (
|
192 | 176 | lib.optionalAttrs (system == "x86_64-linux") {
|
193 | 177 | # on linux, build/test other supported compilers
|
194 |
| - variants = lib.genAttrs ["ghc8107" mingwVersion] (compiler-nix-name: { |
| 178 | + variants = lib.genAttrs ["ghc8107" crossCompilerVersion] (compiler-nix-name: { |
195 | 179 | inherit compiler-nix-name;
|
196 | 180 | });
|
197 | 181 | }
|
|
0 commit comments