Skip to content

Commit 8cfdbb2

Browse files
committed
[ci] Revert windows to ghc 9.0
Build segfaults on 9.4.5
1 parent 6a1262f commit 8cfdbb2

File tree

2 files changed

+42
-45
lines changed

2 files changed

+42
-45
lines changed

.github/workflows/haskell.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
os: [ubuntu-latest, macos-latest, windows-latest]
10+
os: [ubuntu-latest, macos-latest]
1111
pandocver: ["3.1.4"]
1212
ghcver: ['9.4.5']
13+
include:
14+
- os: windows-latest
15+
pandocver: "3.1.4"
16+
ghcver: '9.0.2'
1317
runs-on: ${{ matrix.os }}
1418
container: ${{ matrix.container }}
1519
steps:
1620
- uses: actions/checkout@v2
1721
- uses: haskell/actions/setup@v2
1822
with:
1923
ghc-version: ${{matrix.ghcver}}
20-
cabal: '3.8'
2124
- name: Cabal init
2225
shell: pwsh
2326
run: |

flake.nix

+37-43
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
in
1616
flake-utils.lib.eachSystem supportedSystems (system:
1717
let
18-
linker-workaround = pkgs_.writeShellScript "linker-workaround" ''
18+
linker-workaround = pkgs: pkgs.writeShellScript "linker-workaround" ''
1919
# put all flags into 'params' array
20-
source ${pkgsStatic.stdenv.cc}/nix-support/utils.bash
20+
source ${pkgs.stdenv.cc}/nix-support/utils.bash
2121
expandResponseParams "$@"
2222
2323
# check if '-shared' flag is present
@@ -44,56 +44,50 @@
4444
# invoke the actual linker with the new params
4545
exec x86_64-unknown-linux-musl-cc @<(printf "%q\n" "''${newParams[@]}")
4646
'';
47-
hixProject = args@{ static ? false, ... }:
48-
(pkgs args).haskell-nix.cabalProject {
49-
compiler-nix-name = "ghc945";
50-
src = nix-filter.lib {
51-
root = ./.;
52-
include = [
53-
./docs
54-
./lib
55-
./lib-internal
56-
./src
57-
./test
58-
./pandoc-crossref.cabal
59-
./cabal.project.freeze
60-
./cabal.project
61-
./Setup.hs
62-
./.gitignore
63-
./LICENSE
64-
./README.md
65-
./CHANGELOG.md
66-
];
67-
};
68-
evalSystem = "x86_64-linux";
69-
modules = [{
70-
packages.pandoc-crossref.ghcOptions =
71-
if static then ["-pgml=${linker-workaround}"] else [];
72-
}];
47+
hixProject = pkgs.haskell-nix.cabalProject {
48+
compiler-nix-name = "ghc945";
49+
src = nix-filter.lib {
50+
root = ./.;
51+
include = [
52+
./docs
53+
./lib
54+
./lib-internal
55+
./src
56+
./test
57+
./pandoc-crossref.cabal
58+
./cabal.project.freeze
59+
./cabal.project
60+
./Setup.hs
61+
./.gitignore
62+
./LICENSE
63+
./README.md
64+
./CHANGELOG.md
65+
];
7366
};
74-
overlays = [ haskellNix.overlay (final: prev: {}) ];
75-
pkgsStatic = pkgs_.pkgsCross.musl64;
76-
pkgs_ = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };
77-
pkgs = {static ? false }: if static then pkgsStatic else pkgs_;
78-
flake = (hixProject {}).flake {};
79-
flakeStatic = (hixProject { static = true; }).flake {};
80-
in {
81-
legacyPackages = pkgs {};
67+
evalSystem = "x86_64-linux";
68+
modules = [({pkgs, ...}: with pkgs; {
69+
packages.pandoc-crossref.ghcOptions =
70+
lib.optional stdenv.hostPlatform.isMusl "-pgml=${linker-workaround pkgs}";
71+
})];
72+
};
73+
overlays = [ haskellNix.overlay ];
74+
pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };
75+
flake = hixProject.flake {
76+
crossPlatforms = ps: with ps; [ musl64 ];
77+
};
78+
in pkgs.lib.recursiveUpdate { inherit (flake) packages apps checks; } {
8279
packages = {
8380
default = flake.packages."pandoc-crossref:exe:pandoc-crossref";
84-
static = flakeStatic.packages."pandoc-crossref:exe:pandoc-crossref";
85-
pandoc = (hixProject {}).pandoc-cli.components.exes.pandoc;
81+
static = flake.packages."x86_64-unknown-linux-musl:pandoc-crossref:exe:pandoc-crossref";
82+
pandoc = hixProject.pandoc-cli.components.exes.pandoc;
8683
};
8784
apps = {
8885
default = flake.apps."pandoc-crossref:exe:pandoc-crossref";
8986
test = flake.apps."pandoc-crossref:test:test-pandoc-crossref";
9087
test-integrative = flake.apps."pandoc-crossref:test:test-integrative";
9188
};
92-
devShells.default = pkgs_.mkShell {
93-
buildInputs = [
94-
self.packages.${system}.default
95-
self.packages.${system}.pandoc
96-
];
89+
devShells.default = pkgs.mkShell {
90+
buildInputs = with self.packages.${system}; [ default pandoc ];
9791
};
9892
});
9993

0 commit comments

Comments
 (0)