Skip to content

Commit 156c034

Browse files
committed
fix: bump of nix flake, support for ghc 9.12
1 parent 3378787 commit 156c034

5 files changed

Lines changed: 30 additions & 53 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v2
15-
- uses: cachix/install-nix-action@v18
16-
- uses: cachix/cachix-action@v10
15+
- uses: cachix/install-nix-action@v31
16+
- uses: cachix/cachix-action@v15
1717
with:
1818
name: guibou
1919
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
2020

2121
# Builds
22-
- name: Build current GHC
23-
run: nix build
22+
- name: Build all ghc versions supported by nix
23+
run: nix flake check

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66

77
outputs = { self, nixpkgs, flake-utils }:
88
flake-utils.lib.eachDefaultSystem (system:
9-
let pkgs = nixpkgs.legacyPackages.${system};
10-
11-
in
12-
rec {
9+
let
10+
pkgs = nixpkgs.legacyPackages.${system};
1311
krankBuilder = hPkgs:
1412
let
1513
shell = pkg.env.overrideAttrs (old: {
@@ -24,42 +22,34 @@
2422
});
2523

2624
pkg = (
27-
(pkgs.haskell.lib.dontCheck (hPkgs.callCabal2nix "krank" ./. { }))).overrideAttrs
25+
(pkgs.haskell.lib.dontCheck (hPkgs.callCabal2nix "krank" ./. { }))
26+
).overrideAttrs
2827
(oldAttrs: {
2928
buildInputs = oldAttrs.buildInputs;
3029
passthru = oldAttrs.passthru // { inherit shell shell_hls; };
3130
});
3231
# Add the GHC version in the package name
33-
in pkg.overrideAttrs (old: { name = "krank-ghc${hPkgs.ghc.version}"; });
34-
35-
defaultPackage = packages.krank;
36-
32+
in
33+
pkg.overrideAttrs (old: { name = "krank-ghc${hPkgs.ghc.version}"; });
34+
in
35+
rec {
3736
packages = {
38-
krank = krankBuilder pkgs.haskellPackages;
39-
#krank_88 = krankBuilder pkgs.haskell.packages.ghc88;
40-
krank_90 = krankBuilder pkgs.haskell.packages.ghc90;
41-
krank_92 = krankBuilder pkgs.haskell.packages.ghc92;
42-
krank_94 = krankBuilder pkgs.haskell.packages.ghc94;
43-
krank_96 = krankBuilder pkgs.haskell.packages.ghc96;
44-
krank_98 = krankBuilder pkgs.haskell.packages.ghc98;
45-
#krank_810 = krankBuilder pkgs.haskell.packages.ghc810;
37+
default = krankBuilder pkgs.haskellPackages;
38+
krank_94 = krankBuilder pkgs.haskell.packages.ghc94;
39+
krank_96 = krankBuilder pkgs.haskell.packages.ghc96;
40+
krank_98 = krankBuilder pkgs.haskell.packages.ghc98;
41+
krank_910 = krankBuilder pkgs.haskell.packages.ghc910;
42+
krank_912 = krankBuilder pkgs.haskell.packages.ghc912;
4643
};
4744

48-
devShell = packages.krank.shell_hls;
49-
devShells = {
50-
shell = packages.krank.shell;
51-
shell_hls = packages.krank.shell_hls;
45+
checks = {
46+
inherit (packages) krank_94 krank_96 krank_98 krank_910 krank_912;
5247
};
5348

54-
all = pkgs.linkFarmFromDrvs "all" (builtins.attrValues packages);
55-
56-
apps = {
57-
ormolu = {
58-
type = "app";
59-
program = "${pkgs.writeScript "ormolu" ''
60-
${pkgs.ormolu}/bin/ormolu --mode inplace $(git ls-files | grep '\.hs$')
61-
''}";
62-
};
49+
devShells = rec {
50+
shell = packages.default.shell;
51+
shell_hls = packages.default.shell_hls;
52+
default = shell_hls;
6353
};
6454
});
6555
}

nixpkgs.nix

Lines changed: 0 additions & 8 deletions
This file was deleted.

shell.nix

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)