Skip to content

Commit

Permalink
v1.4.3: support GHC 9.6, 9.8 (#105)
Browse files Browse the repository at this point in the history
v1.4.3: support GHC 9.6, 9.8

Skip GHC 9.0+Darwin due to crypton problem.
  • Loading branch information
j6carey authored May 21, 2024
1 parent d130c70 commit cef201d
Show file tree
Hide file tree
Showing 20 changed files with 458 additions and 23 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ jobs:
ghc:
- 8107
- 902
- 924
- 946
- 928
- 948
- 962
- 981
exclude:
- os: macos-latest
ghc: 902
runs-on: ${{ matrix.os }}

steps:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.4.3
- Support GHC 9.8
- Support GHC 9.6

1.4.2
- Support GHC 9.4

Expand Down
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,30 @@ To run tests or generate documentation, use
```text
stack build [--test] [--haddock]
```

### GHC Versions

#### GHC 9.8

Supported on Linux and Darwin.

#### GHC 9.6

Supported on Linux and Darwin.

#### GHC 9.4

Supported on Linux and Darwin.

#### GHC 9.2

Supported on Linux and Darwin.

#### GHC 9.0

Supported only on Linux because "crypton" fails a test on Darwin,
probably due to [this issue](https://github.com/kazu-yamamoto/crypton/issues/35).

#### GHC 8.10.7

Supported on Linux and Darwin.
160 changes: 151 additions & 9 deletions nix/haskell-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,157 @@ pkgsNew: pkgsOld:
{
haskellPackages = pkgsOld.haskell.packages."${compiler}".override (old: {
overrides =
pkgsOld.lib.composeExtensions
pkgsNew.lib.fold pkgsNew.lib.composeExtensions
(old.overrides or (_: _: {}))
(haskellPackagesFinal: haskellPackagesPrev: {
proto3-wire = haskellPackagesFinal.callCabal2nix "proto3-wire" ../. { };

# ghc-9.2 requires word-compat-0.0.6
word-compat = haskellPackagesFinal.callPackage ./word-compat.nix { };
# Use newer version 4.7.1.0 for ghc-9.x support
data-diverse = haskellPackagesFinal.callPackage ./data-diverse.nix { };
});
[ (pkgsNew.haskell.lib.packagesFromDirectory { directory = ./packages; })
(haskellPackagesFinal: haskellPackagesPrev: {
# With nixpkgs-23.11 and ghc981, adjunctions wants hspec for testing,
# which causes problems.
adjunctions =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.adjunctions;

# With nixpkgs-23.11 and ghc981, aeson-2.1.2.1 thinks that th-abstraction is out of bounds.
# Also, in order to avoid the breaking change to package structure in aeson-2.2.0.0,
# we patch the import list of aeson-2.1.2.1.
aeson =
pkgsNew.haskell.lib.doJailbreak
( pkgsNew.haskell.lib.appendPatches haskellPackagesPrev.aeson
[ ./patches/aeson-2.1.2.1.patch ] );

# With nixpkgs-23.11 and ghc981, base-compat-batteries wants hspec for testing,
# which causes problems.
base-compat-batteries =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.base-compat-batteries;

# With nixpkgs-23.11 and ghc981, base-orphans wants hspec for testing,
# which causes problems.
base-orphans =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.base-orphans;

# With nixpkgs-23.11 and ghc981, bifunctors wants hspec for testing,
# which causes problems.
bifunctors =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.bifunctors;

# With nixpkgs-23.11 and ghc981, conduit wants hspec for testing,
# which causes problems.
conduit =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.conduit;

# With nixpkgs-23.11 and ghc981, data-diverse wants hspec for testing,
# which causes problems.
data-diverse =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.data-diverse;

# With nixpkgs-23.11 and ghc981, distribution-nixpkgs wants hspec for testing,
# which causes problems.
distribution-nixpkgs =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.distribution-nixpkgs;

# With nixpkgs-23.11 and ghc981, distributive wants hspec for testing,
# which causes problems.
distributive =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.distributive;

# With ghc981, doctest-0.22.2 complains about the version of the base
# package and depends on hspec for testing, which causes problems.
doctest =
pkgsNew.haskell.lib.dontCheck
(pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.doctest);

# With nixpkgs-23.11 and ghc981, generic-deriving wants hspec for testing,
# which causes problems. Also, it generic-deriving thinks that
# th-abstraction is out of bounds.
generic-deriving =
pkgsNew.haskell.lib.dontCheck
(pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.generic-deriving);

# With nixpkgs-23.11 and ghc981, hourglass does not support the version
# of the time package that is provided, but that matters only to tests.
hourglass =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.hourglass;

# With nixpkgs-23.11 and ghc981, hpack-0.36.0 wants hspec for testing,
# which causes problems.
hpack =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.hpack;

# With nixpkgs-23.11 and ghc981, http-types wants hspec for testing,
# which causes problems.
http-types =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.http-types;

# With nixpkgs-23.11 and ghc981, infer-license wants hspec for testing,
# which causes problems.
infer-license =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.infer-license;

# With nixpkgs-23.11 and ghc981, invariant indirectly depends on hspec for testing,
# which causes problems. Also, it generic-deriving thinks that
# th-abstraction is out of bounds.
invariant =
pkgsNew.haskell.lib.dontCheck
(pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.invariant);

# With nixpkgs-23.11 and ghc981, iproute wants hspec for testing,
# which causes problems.
iproute =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.iproute;

# With nixpkgs-23.11 and ghc981, monad-par wants test-framework for testing, which
# wants language-haskell-extract, which does not support modern template-haskell.
monad-par =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.monad-par;

# With nixpkgs-23.11 and ghc981, mono-traversable wants hspec for testing,
# which causes problems.
mono-traversable =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.mono-traversable;

# With nixpkgs-23.11 and ghc981, streaming-commons wants hspec for testing,
# which causes problems.
streaming-commons =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.streaming-commons;

# With nixpkgs-23.11 and ghc981, reflection indirectly depends on hspec for testing,
# which causes problems.
reflection =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.reflection;

# With nixpkgs-23.11 and ghc981, resourcet wants hspec for testing,
# which causes problems.
resourcet =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.resourcet;

# Suppress:
# warning: non-portable path to file '"dist/build/Test/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
tasty-golden =
pkgsNew.haskell.lib.appendConfigureFlags haskellPackagesPrev.tasty-golden
[ "--ghc-option=-Wno-nonportable-include-path" ];

# With nixpkgs-23.11 and ghc981, text-metrics wants hspec for testing,
# which causes problems.
text-metrics =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.text-metrics;

# With nixpkgs-23.11 and ghc981, th-compat wants hspec for testing,
# which causes problems.
th-compat =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.th-compat;

# With nixpkgs-23.11 and ghc981, hpack-0.36.0 wants hspec for testing,
# which causes problems.
unix-time =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.unix-time;

# With nixpkgs-23.11 and ghc981, yaml wants hspec for testing,
# which causes problems.
yaml =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.yaml;
})
(haskellPackagesFinal: haskellPackagesPrev: {
proto3-wire = haskellPackagesFinal.callCabal2nix "proto3-wire" ../. { };
})
];
});
}
8 changes: 4 additions & 4 deletions nix/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ args:

let
nixpkgs = builtins.fetchTarball {
# release: nixpkgs-23.05pre491123.261abe8a44a7
# commit: 261abe8a44a7e8392598d038d2e01f7b33cf26d0
url = "https://hydra.nixos.org/build/236149912/download/2/nixpkgs-23.05pre491123.261abe8a44a7.tar.xz";
sha256 = "0yhf6zbnkj3a7wfas5clli5qk4xl0cw5zq5w4fzvd724za5nb04f";
# build: https://hydra.nixos.org/build/258096332
# commit: 0638fe2715d998fa81d173aad264eb671ce2ebc1
url = "https://hydra.nixos.org/build/258096332/download/2/nixpkgs-23.11pre558121.0638fe2715d9.tar.xz";
sha256 = "1z3s1hqg3b72g608pf9sv474d4y9s00p86nsvfw5i9xgwhjncjjb";
};
in import nixpkgs ({ config = { }; } // args)
22 changes: 22 additions & 0 deletions nix/packages/bifunctors.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ mkDerivation, assoc, base, comonad, containers
, foldable1-classes-compat, hspec, hspec-discover, lib, QuickCheck
, tagged, template-haskell, th-abstraction, transformers
, transformers-compat
}:
mkDerivation {
pname = "bifunctors";
version = "5.6.2";
sha256 = "1086a9285061eed0c2c5d3cb65aa223defd52fca6d0515bb69ddf2dbc3d9697a";
libraryHaskellDepends = [
assoc base comonad containers foldable1-classes-compat tagged
template-haskell th-abstraction transformers
];
testHaskellDepends = [
base hspec QuickCheck template-haskell transformers
transformers-compat
];
testToolDepends = [ hspec-discover ];
homepage = "http://github.com/ekmett/bifunctors/";
description = "Bifunctors";
license = lib.licenses.bsd3;
}
30 changes: 30 additions & 0 deletions nix/packages/doctest.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{ mkDerivation, base, code-page, deepseq, directory, exceptions
, filepath, ghc, ghc-paths, hspec, hspec-core, hspec-discover
, HUnit, lib, mockery, process, QuickCheck, setenv, silently
, stringbuilder, syb, transformers
}:
mkDerivation {
pname = "doctest";
version = "0.22.2";
sha256 = "afb839c14019c17e3ec7900871a9fc104226028858c724932d53225ae382c6e5";
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
base code-page deepseq directory exceptions filepath ghc ghc-paths
process syb transformers
];
executableHaskellDepends = [
base code-page deepseq directory exceptions filepath ghc ghc-paths
process syb transformers
];
testHaskellDepends = [
base code-page deepseq directory exceptions filepath ghc ghc-paths
hspec hspec-core HUnit mockery process QuickCheck setenv silently
stringbuilder syb transformers
];
testToolDepends = [ hspec-discover ];
homepage = "https://github.com/sol/doctest#readme";
description = "Test interactive Haskell examples";
license = lib.licenses.mit;
mainProgram = "doctest";
}
19 changes: 19 additions & 0 deletions nix/packages/free.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{ mkDerivation, base, comonad, containers, distributive, exceptions
, indexed-traversable, lib, mtl, profunctors, semigroupoids
, template-haskell, th-abstraction, transformers, transformers-base
}:
mkDerivation {
pname = "free";
version = "5.2";
sha256 = "72867f7c89173263765736e8d395e94291f1aaea626ecb1d673d72ce90b94f89";
revision = "4";
editedCabalFile = "0vic3p2viip8gjww8fx19ax6ry7y34h7xclvhzkvmbspjh9d219x";
libraryHaskellDepends = [
base comonad containers distributive exceptions indexed-traversable
mtl profunctors semigroupoids template-haskell th-abstraction
transformers transformers-base
];
homepage = "http://github.com/ekmett/free/";
description = "Monads for free";
license = lib.licenses.bsd3;
}
40 changes: 40 additions & 0 deletions nix/packages/hpack.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{ mkDerivation, aeson, base, bifunctors, bytestring, Cabal
, containers, crypton, deepseq, directory, filepath, Glob, hspec
, hspec-discover, http-client, http-client-tls, http-types, HUnit
, infer-license, interpolate, lib, mockery, mtl, pretty, QuickCheck
, scientific, template-haskell, temporary, text, transformers
, unordered-containers, vector, yaml
}:
mkDerivation {
pname = "hpack";
version = "0.36.0";
sha256 = "a0de4e1a0fe587030fa643cad99cd96de81e295923ffb57cfc7b1575f253ea7a";
revision = "1";
editedCabalFile = "1zh5rsf38xmwp7lf80iifrhnkl80lri4xzlhz2n5df3vc0dqzya8";
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson base bifunctors bytestring Cabal containers crypton deepseq
directory filepath Glob http-client http-client-tls http-types
infer-license mtl pretty scientific text transformers
unordered-containers vector yaml
];
executableHaskellDepends = [
aeson base bifunctors bytestring Cabal containers crypton deepseq
directory filepath Glob http-client http-client-tls http-types
infer-license mtl pretty scientific text transformers
unordered-containers vector yaml
];
testHaskellDepends = [
aeson base bifunctors bytestring Cabal containers crypton deepseq
directory filepath Glob hspec http-client http-client-tls
http-types HUnit infer-license interpolate mockery mtl pretty
QuickCheck scientific template-haskell temporary text transformers
unordered-containers vector yaml
];
testToolDepends = [ hspec-discover ];
homepage = "https://github.com/sol/hpack#readme";
description = "A modern format for Haskell packages";
license = lib.licenses.mit;
mainProgram = "hpack";
}
23 changes: 23 additions & 0 deletions nix/packages/http-client-tls.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ mkDerivation, base, bytestring, case-insensitive, containers
, crypton, crypton-connection, data-default-class, exceptions
, gauge, hspec, http-client, http-types, lib, memory, network
, network-uri, text, tls, transformers
}:
mkDerivation {
pname = "http-client-tls";
version = "0.3.6.3";
sha256 = "38dcfc3d772eb6898b4a8856d6159824d13f65eb291733619f625a802dad9095";
libraryHaskellDepends = [
base bytestring case-insensitive containers crypton
crypton-connection data-default-class exceptions http-client
http-types memory network network-uri text tls transformers
];
testHaskellDepends = [
base crypton-connection hspec http-client http-types
];
benchmarkHaskellDepends = [ base gauge http-client ];
doCheck = false;
homepage = "https://github.com/snoyberg/http-client";
description = "http-client backend using the connection package and tls library";
license = lib.licenses.mit;
}
Loading

0 comments on commit cef201d

Please sign in to comment.