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

Merge upstream #5

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ jobs:
ghc:
- 8107
- 902
- 924
- 928
- 948
- 965
- 982
- 9101
exclude:
- os: macos-latest
ghc: 902
runs-on: ${{ matrix.os }}

steps:
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
1.4.4
- Support GHC 9.10

1.4.3
- Support GHC 9.8
- Support GHC 9.6

1.4.2
- Support GHC 9.4

1.4.1
- Support ShortByteString and ShortText

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

### GHC Versions

#### GHC 9.10

Supported on Linux and Darwin.

#### 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.
3 changes: 3 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
packages: .
benchmarks: True
tests: True
161 changes: 152 additions & 9 deletions nix/haskell-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,158 @@ 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-24.11 and our overrides, and when building with GHC 8.10,
# aeson thinks that th-abstraction is out of bounds.
aeson =
pkgsNew.haskell.lib.doJailbreak haskellPackagesPrev.aeson;

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

# 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: 5 additions & 3 deletions nix/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ args:

let
nixpkgs = builtins.fetchTarball {
# nixos-22.05 as on 2023-07-17
url = "https://github.com/NixOS/nixpkgs/archive/380be19fbd2d9079f677978361792cb25e8a3635.tar.gz";
sha256 = "154x9swf494mqwi4z8nbq2f0sp8pwp4fvx51lqzindjfbb9yxxv5";
# from: https://hydra.nixos.org/job/nixos/release-24.11/nixpkgs.tarball
# build: https://hydra.nixos.org/build/284195557
# commit: cbd8ec4de4469333c82ff40d057350c30e9f7d36
url = "https://hydra.nixos.org/build/284195557/download/2/nixpkgs-24.11pre712431.cbd8ec4de446.tar.xz";
sha256 = "0ljq084fq784fgvm7n9081dmnjhksz20vwzca2zics0kkkzjxh5k";
};
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";
}
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;
}
37 changes: 37 additions & 0 deletions nix/packages/lens.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{ mkDerivation, array, assoc, base, base-orphans, bifunctors
, bytestring, call-stack, comonad, containers, contravariant
, criterion, deepseq, distributive, exceptions, filepath, free
, generic-deriving, ghc-prim, hashable, HUnit, indexed-traversable
, indexed-traversable-instances, kan-extensions, lib, mtl, parallel
, profunctors, QuickCheck, reflection, semigroupoids
, simple-reflect, strict, tagged, template-haskell, test-framework
, test-framework-hunit, test-framework-quickcheck2, text
, th-abstraction, these, transformers, transformers-compat
, unordered-containers, vector
}:
mkDerivation {
pname = "lens";
version = "5.3.1";
sha256 = "dac3ff7abd483ef36956882631fdcde922e086b51f459c0c02e690c6b7f24b6c";
libraryHaskellDepends = [
array assoc base base-orphans bifunctors bytestring call-stack
comonad containers contravariant distributive exceptions filepath
free ghc-prim hashable indexed-traversable
indexed-traversable-instances kan-extensions mtl parallel
profunctors reflection semigroupoids strict tagged template-haskell
text th-abstraction these transformers transformers-compat
unordered-containers vector
];
testHaskellDepends = [
base bytestring containers deepseq HUnit mtl QuickCheck
simple-reflect test-framework test-framework-hunit
test-framework-quickcheck2 text transformers
];
benchmarkHaskellDepends = [
base bytestring comonad containers criterion deepseq
generic-deriving transformers unordered-containers vector
];
homepage = "http://github.com/ekmett/lens/";
description = "Lenses, Folds and Traversals";
license = lib.licenses.bsd2;
}
10 changes: 10 additions & 0 deletions nix/packages/parsec-class.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ mkDerivation, base, lib, parsec }:
mkDerivation {
pname = "parsec-class";
version = "1.0.1.0";
sha256 = "068686c03627ffca77128a762de295c4a43095b9e8dbe3829efc91fed00c418c";
libraryHaskellDepends = [ base parsec ];
homepage = "https://github.com/peti/parsec-class";
description = "Class of types that can be constructed from their text representation";
license = lib.licenses.mit;
}
19 changes: 19 additions & 0 deletions nix/packages/semigroupoids.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{ mkDerivation, base, base-orphans, bifunctors, comonad, containers
, contravariant, distributive, foldable1-classes-compat, hashable
, lib, tagged, template-haskell, transformers, transformers-compat
, unordered-containers
}:
mkDerivation {
pname = "semigroupoids";
version = "6.0.1";
sha256 = "1d532030862414f5d4f2f6f001783f77aa14e5f05ee8e3c4a2d2129fca29cc1f";
libraryHaskellDepends = [
base base-orphans bifunctors comonad containers contravariant
distributive foldable1-classes-compat hashable tagged
template-haskell transformers transformers-compat
unordered-containers
];
homepage = "http://github.com/ekmett/semigroupoids";
description = "Semigroupoids: Category sans id";
license = lib.licenses.bsd2;
}
Loading