haskellPackages.hnix: unbreak

The mystery build failure was caused by having the same instance as an
orphan and imported from ref-tf 0.5 (why ever that doesn't warrant a
logged error message…). The solution for this is
https://github.com/haskell-nix/hnix/pull/918, which sadly doesn't apply
cleanly on the hnix 0.12.0.1 tarball. Therefore I've backported the
patch until hnix hopefully gets a new hackage release soon.
This commit is contained in:
sternenseemann
2021-05-05 12:55:29 +02:00
committed by sterni
parent eb9b3a59f0
commit 20020d3ec8
2 changed files with 47 additions and 1 deletions
@@ -197,7 +197,19 @@ self: super: {
digit = doJailbreak super.digit;
# 2020-06-05: HACK: does not pass own build suite - `dontCheck`
hnix = generateOptparseApplicativeCompletion "hnix" (dontCheck super.hnix);
hnix = generateOptparseApplicativeCompletion "hnix"
(overrideCabal super.hnix (drv: {
doCheck = false;
prePatch = ''
# fix encoding problems when patching
${pkgs.dos2unix}/bin/dos2unix hnix.cabal
'' + (drv.prePatch or "");
patches = [
# support ref-tf in hnix 0.12.0.1, can be removed after
# https://github.com/haskell-nix/hnix/pull/918
./patches/hnix-ref-tf-0.5-support.patch
] ++ (drv.patches or []);
}));
# Fails for non-obvious reasons while attempting to use doctest.
search = dontCheck super.search;