tvl-depot/third_party/nixpkgs-exposed/haskell_overlay/default.nix
sterni a01fe5c06f fix(gs/xanthous): fix build failures caused by dependency updates
The following changes in dependencies of xanthous broke the build and
have been fixed in this CL. Thus we can reenable CI for xanthous.

* random 1.2.0 removed the Read instance for StdGen, so we need use
  System.Random.Internal to un-newtype StdGen into an SMGen in the
  appropriate places as that type still has a Show and Read instance.
  Requires a new direct dependency on splitmix as well.

* witherable 4.0 renamed Data.Witherable into Witherable and no longer
  exports Filter.

* random 1.2.0 probably also broke the Function instance for GameState
  which contains a StdGen. I'm not exactly sure which change exactly
  triggered this, but the fix is easy enough: We implement a Function
  instance for SMGen using functionShow allowing us to write a Function
  instance for StdGen using functionMap. I've put these instances into
  Xanthous.Orphans.

* hgeometry 0.12.0.0 removes the triangulationEdges function (which is
  also not mentioned in the changelog, so I'm not sure if there's a
  replacement yet). Fix by pinning to 0.11.0.0 for now.

* hedgehog-classes: relax bounds on semirings

Change-Id: I3617d8916d753b386c9fa80062be6bcbdfee0131
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2607
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2021-03-19 16:49:44 +00:00

44 lines
1.4 KiB
Nix

{ pkgs }:
self: super: with pkgs.haskell.lib; rec {
generic-arbitrary = appendPatch
super.generic-arbitrary
[ ./patches/generic-arbitrary-export-garbitrary.patch ];
random = dontCheck (self.callHackageDirect {
pkg = "random";
ver = "1.2.0";
sha256 = "06s3mmqbsfwv09j2s45qnd66nrxfp9280gnl9ng8yh128pfr7bjh";
} {});
# random <1.2
test-framework = doJailbreak super.test-framework;
hashable = doJailbreak super.hashable;
test-framework-quickcheck2 = doJailbreak super.test-framework-quickcheck2;
# can be removed if we have the following PR or equivalent
# https://github.com/NixOS/nixpkgs/pull/116931
hedgehog-classes = overrideCabal super.hedgehog-classes (attrs: {
# remove version bound on semirings which is inside a
# conditional, so doJailbreak doesn't work
prePatch = ''
sed -i 's|semirings.*0.6|semirings|g' hedgehog-classes.cabal
'';
});
# pin hgeometry* to 0.11.0.0 since 0.12.0.0 removes triangulationEdges
# which is used by //users/glittershark/xanthous
hgeometry =
self.callHackageDirect {
pkg = "hgeometry";
ver = "0.11.0.0";
sha256 = "0qidbpgs6jxrirrhmy7iabwd62178sm68fqrmqg3w3gfyx8nm8ls";
} {};
hgeometry-combinatorial =
self.callHackageDirect {
pkg = "hgeometry-combinatorial";
ver = "0.11.0.0";
sha256 = "0c9ccqz1m45kkdkzw00gvzdspjljhg12vish6himqjqpms7g6sag";
} {};
}