Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.4.3: support GHC 9.6, 9.8 #105

Merged
merged 4 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
266 changes: 257 additions & 9 deletions nix/haskell-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,263 @@ 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, atomic-write wants hspec for testing,
# which causes problems.
atomic-write =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.atomic-write;

# 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, constraints wants hspec for testing,
# which causes problems.
constraints =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.constraints;

# 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, half thinks that deepseq is out of bounds.
half =
pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.half;

# 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 our overrides, insert-ordered-containers thinks that lens is out of bounds.
insert-ordered-containers =
pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.insert-ordered-containers;

# 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 ghc962, generics-sop-0.5.1.4 thinks that th-abstraction is out of bounds.
generics-sop =
pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.generics-sop;

# At a guess the test failures are some environmental issue,
# like being unable to contact "download.fpcomplete.com" due
# to the Nix build environment.
http-download =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.http-download;

# With nixpkgs-23.11 and ghc902, large-generics thinks that primitive is out of bounds.
large-generics =
pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.large-generics;

# With nixpkgs-23.11 and ghc902, large-records thinks that primitive is out of bounds.
large-records =
pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.large-records;

# With nixpkgs-23.11 and ghc981 (or perhaps our customized dependencies),
# the tests in lifted-base fail.
lifted-base =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.lifted-base;

# With nixpkgs-23.11 and our overrides, microlens-th thinks that th-abstraction is out of bounds.
microlens-th =
pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.microlens-th;

# 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 our overrides, neat-interpolation that rebase is out of bounds.
neat-interpolation =
pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.neat-interpolation;

# Patch to enable building of pantry when using ghc902.
#
# Also disable failing tests. At a guess the test failures are some
# environmental issue, like being unable to contact "hackage.haskell.org"
# due to the Nix build environment.
pantry_0_9_2 =
pkgsNew.haskell.lib.dontCheck
( pkgsNew.haskell.lib.appendPatches haskellPackagesPrev.pantry_0_9_2
[ ./patches/pantry-0.9.3.2.patch ] );

# With nixpkgs-23.11 and our overrides, rerebase that rebase is out of bounds.
rerebase =
pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.rerebase;

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

# 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 our dependency overrides, swagger2 wants hspec for testing,
# which causes problems. Also, we jailbreak to allow a newer version of lens.
swagger2 =
pkgsNew.haskell.lib.dontCheck
(pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.swagger2);

# 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, resourceat wants hspec for testing,
# which causes problems.
resourceat =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.resourceat;

# With nixpkgs-23.11 and our overrides, stack objects to a number of dependencies,
# at least on ghc902.
stack =
pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.stack;

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

# At a guess the test build failures are a bytestring version issue.
tar-conduit =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.tar-conduit;

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

# 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 our overrides, th-expand-syns thinks that th-abstraction is out of bounds.
th-expand-syns =
pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.th-expand-syns;

# With nixpkgs-23.11 and our overrides, th-lift thinks that th-abstraction is out of bounds.
th-lift =
pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.th-lift;

# With nixpkgs-23.11 and ghc981, unix-compat wants hspec for testing,
# which causes problems.
unix-compat =
pkgsNew.haskell.lib.dontCheck haskellPackagesPrev.unix-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;
}
21 changes: 21 additions & 0 deletions nix/packages/cborg.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ mkDerivation, aeson, array, base, base-orphans, base16-bytestring
, base64-bytestring, bytestring, containers, deepseq, ghc-bignum
, ghc-prim, half, lib, primitive, QuickCheck, random, scientific
, tasty, tasty-hunit, tasty-quickcheck, text, vector
}:
mkDerivation {
pname = "cborg";
version = "0.2.10.0";
sha256 = "17fe070c38fc498cab49bcb9d6215b7747d53bedf96502e9bcce9cad73b9c797";
libraryHaskellDepends = [
array base bytestring containers deepseq ghc-bignum ghc-prim half
primitive text
];
testHaskellDepends = [
aeson array base base-orphans base16-bytestring base64-bytestring
bytestring deepseq half primitive QuickCheck random scientific
tasty tasty-hunit tasty-quickcheck text vector
];
description = "Concise Binary Object Representation (CBOR)";
license = lib.licenses.bsd3;
}
Loading
Loading