3
0
Fork 0
forked from mirrors/nixpkgs

haskellPackages.tasty-discover: fix build with tasty-hspec >= 1.2

This commit is contained in:
sternenseemann 2022-02-18 18:09:36 +01:00
parent 36613295ab
commit bf8bd354dd

View file

@ -447,6 +447,26 @@ self: super: {
# Depends on itself for testing
tasty-discover = overrideCabal (drv: {
# Compatibility with tasty-hspec >= 1.1.7 requires a patch and a dependency on hspec
patches = drv.patches or [] ++ [
# Intermediate patch so fix applies
(pkgs.fetchpatch {
url = "https://github.com/haskell-works/tasty-discover/commit/67b022f5945abdfb71ca31fca7910abc7effe043.patch";
sha256 = "1x539qa2871fiahw9zjxyyqz86v4ib7k7fv9hdvvxcrrfw3zwl66";
})
# Actual fix
(pkgs.fetchpatch {
name = "tasty-hspec-1.1.7-compat.patch";
url = "https://github.com/haskell-works/tasty-discover/commit/98d3c464f33129e38fa9c0fcdfb1847dfb0490b9.patch";
sha256 = "01a8ni3lyh1wql7aghl41nd2c9m6gcn1i77bh3pygh6r403x771p";
})
];
testHaskellDepends = drv.testHaskellDepends or [] ++ [
self.hspec
];
# https://github.com/haskell-works/tasty-discover/issues/17
jailbreak = true; # allow tasty-hspec >= 1.2
preBuild = ''
export PATH="$PWD/dist/build/tasty-discover:$PATH"
'' + (drv.preBuild or "");