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

依存ライブラリーのバージョン範囲を緩和 GHC 9.8 対応 #3

Merged
merged 2 commits into from
Oct 29, 2024
Merged
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
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ compiler ? "ghc8107"
{ compiler ? "ghc982"
, enableDhall ? false
, enableSwagger ? true
, swaggerWrapperFormat ? false
Expand Down
9 changes: 5 additions & 4 deletions nix/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ 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";
# from: https://hydra.nixos.org/job/nixos/release-24.05/nixpkgs.tarball
# build: https://hydra.nixos.org/build/262713240
# commit: cc54fb41d13736e92229c21627ea4f22199fee6b
url = "https://hydra.nixos.org/build/262713240/download/2/nixpkgs-24.05pre631579.cc54fb41d137.tar.xz";
sha256 = "01jgwy8ixfnl7dig5qhih34lrx2g9xpj64yr49n0lyvpwj44s475";
};
in import nixpkgs ({ config = { }; } // args)
255 changes: 252 additions & 3 deletions nix/overlays/haskell-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,251 @@ in {
[ (pkgsNew.haskell.lib.packagesFromDirectory { directory = ../packages; })

(haskellPackagesNew: haskellPackagesOld: {

# With nixpkgs-23.11 and ghc981, adjunctions wants hspec for testing,
# which causes problems.
adjunctions =
pkgsNew.haskell.lib.dontCheck haskellPackagesOld.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.
#
# And we disable tests because explicitly specifying aeson-2.1.2.1
# seems to trigger a test failure, at least on GHC 9.4.8 and 9.8.1;
# perhaps somewhere in nixpkgs the test is suppressed and
# overriding the Nix definition re-enables testing?
#
# encodeDouble: FAIL
# *** Failed! Falsified (after 15 tests and 2 shrinks):
# 1.0
# 0.0
# "\"+inf\"" /= "null"
# Use --quickcheck-replay=305830 to reproduce.
# Use -p '/encodeDouble/' to rerun this test only.
#
aeson =
pkgsNew.haskell.lib.doJailbreak
( pkgsNew.haskell.lib.dontCheck
( pkgsNew.haskell.lib.appendPatches haskellPackagesOld.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 haskellPackagesOld.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 haskellPackagesOld.base-compat-batteries;

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

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

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

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

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

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

# With nixpkgs-23.11 and ghc981, distributive wants hspec for testing,
# which causes problems.
distributive =
pkgsNew.haskell.lib.dontCheck haskellPackagesOld.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 haskellPackagesOld.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 haskellPackagesOld.generic-deriving);

# With nixpkgs-23.11 and ghc981, half thinks that deepseq is out of bounds.
half =
pkgsNew.haskell.lib.doJailbreak haskellPackagesOld.half;

# With nixpkgs-24.05 and ghc982, we observed a non-reproducible
# failure of the hedgehog tests. Rather than risk occasional
# failures building this test dependency, we skip its tests.
hedgehog =
pkgsNew.haskell.lib.dontCheck haskellPackagesOld.hedgehog;

# 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 haskellPackagesOld.hourglass;

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

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

# With nixpkgs-23.11 and ghc981, infer-license wants hspec for testing,
# which causes problems.
infer-license =
pkgsNew.haskell.lib.dontCheck haskellPackagesOld.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 haskellPackagesOld.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 haskellPackagesOld.invariant);

# With nixpkgs-23.11 and ghc981, iproute wants hspec for testing,
# which causes problems.
iproute =
pkgsNew.haskell.lib.dontCheck haskellPackagesOld.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 haskellPackagesOld.generics-sop;

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

# With nixpkgs-23.11 and ghc902, large-records thinks that primitive is out of bounds.
large-records =
pkgsNew.haskell.lib.doJailbreak haskellPackagesOld.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 haskellPackagesOld.lifted-base;

# 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 haskellPackagesOld.monad-par;

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

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

# With GHC 9.0/9.2, "network-uri" with testing enabled would find that
# "th-compat" wants an older version of "directory" than does "process".
network-uri =
pkgsNew.haskell.lib.dontCheck haskellPackagesOld.network-uri;

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

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

# With nixpkgs-23.11 and ghc981, streaming-commons wants hspec for testing,
# which causes problems.
streaming-commons =
pkgsNew.haskell.lib.dontCheck haskellPackagesOld.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 haskellPackagesOld.swagger2);

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

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

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

# With nixpkgs-23.11 and ghc981, tasty-discover wants hspec for testing,
# which causes problems.
tasty-discover =
pkgsNew.haskell.lib.dontCheck haskellPackagesOld.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 haskellPackagesOld.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 haskellPackagesOld.text-metrics;

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

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

# With nixpkgs-23.11 and ghc981, unix-compat wants hspec for testing,
# which causes problems.
unix-compat =
pkgsNew.haskell.lib.dontCheck haskellPackagesOld.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 haskellPackagesOld.unix-time;

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

range-set-list =
pkgsNew.haskell.lib.overrideCabal
haskellPackagesOld.range-set-list
Expand All @@ -34,15 +279,19 @@ in {
jailbreak = true;
});

# With nixpkgs-23.11 and ghc962, proto3-wire thinks
# that doctest and transformers are out of bounds.
proto3-wire =
let
source = pkgsNew.fetchFromGitHub {
owner = "awakesecurity";
repo = "proto3-wire";
rev = "938523213d5de2d0ad9ece051d1a03002ee539cc";
sha256 = "GVH3N1KrFUVpR8ZRkjZcRp51VgMtSXqClL88dM7FBdc=";
rev = "b3d837f66d97f97f1ad46c5bb0f1d1bb3b7b13c1"; # 1.4.2
sha256 = "LXinRHg7fjBf9of7pDm/oWAacCwJ9x/PtnJz6S0W/FA=";
};
in haskellPackagesNew.callCabal2nix "proto3-wire" source { };
in
pkgsNew.haskell.lib.doJailbreak
(haskellPackagesNew.callCabal2nix "proto3-wire" source { });

proto3-suite-base =
let
Expand Down
38 changes: 38 additions & 0 deletions nix/packages/aeson.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ mkDerivation, attoparsec, base, base-compat
, base-compat-batteries, base-orphans, base16-bytestring
, bytestring, containers, data-fix, deepseq, Diff, directory, dlist
, exceptions, filepath, generic-deriving, generically, ghc-prim
, hashable, indexed-traversable, integer-logarithms, lib, OneTuple
, primitive, QuickCheck, quickcheck-instances, scientific
, semialign, strict, tagged, tasty, tasty-golden, tasty-hunit
, tasty-quickcheck, template-haskell, text, text-short
, th-abstraction, these, time, time-compat, unordered-containers
, uuid-types, vector, witherable
}:
mkDerivation {
pname = "aeson";
version = "2.1.2.1";
sha256 = "5d4042b903ce181ee023bbf908f37a3f55e820c5f0df102683b87f963e3522c6";
revision = "3";
editedCabalFile = "19qj4s625b34kw8ryb2ji0hs6dg2m116x913s722bab316k653av";
libraryHaskellDepends = [
attoparsec base base-compat-batteries bytestring containers
data-fix deepseq dlist exceptions generically ghc-prim hashable
indexed-traversable OneTuple primitive QuickCheck scientific
semialign strict tagged template-haskell text text-short
th-abstraction these time time-compat unordered-containers
uuid-types vector witherable
];
testHaskellDepends = [
attoparsec base base-compat base-orphans base16-bytestring
bytestring containers data-fix Diff directory dlist filepath
generic-deriving generically ghc-prim hashable indexed-traversable
integer-logarithms OneTuple primitive QuickCheck
quickcheck-instances scientific strict tagged tasty tasty-golden
tasty-hunit tasty-quickcheck template-haskell text text-short these
time time-compat unordered-containers uuid-types vector
];
homepage = "https://github.com/haskell/aeson";
description = "Fast JSON parsing and encoding";
license = lib.licenses.bsd3;
}
11 changes: 11 additions & 0 deletions nix/packages/attoparsec-aeson.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ mkDerivation, aeson, base, lib }:
mkDerivation {
pname = "attoparsec-aeson";
version = "2.1.0.0";
sha256 = "b34afb1c330428d9ff7e9e99655ece826ed7a1928dd5880c8127e73a12e906a9";
libraryHaskellDepends = [ aeson base ];
doHaddock = false;
homepage = "https://github.com/haskell/aeson";
description = "Parsing of aeson's Value with attoparsec";
license = lib.licenses.bsd3;
}
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