From bc8b615344c6ca7746a527058ffc1f0726aff897 Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Sun, 21 Jun 2020 21:23:47 +0200 Subject: [PATCH] hackagePackages.hnix: Fix build hnix 0.9.0 does not provide an executable for ghc <8.10 anymore. So we need to disable optparse-applicative completion generation for all other versions. --- .../haskell-modules/configuration-common.nix | 10 ++++++---- .../haskell-modules/configuration-ghc-8.10.x.nix | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index c4056f42d5b..fcb692d77d3 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -219,10 +219,12 @@ self: super: { # base bound digit = doJailbreak super.digit; - # 2020-06-05: HACK: does not passes own build suite - `dontCheck` - hnix = generateOptparseApplicativeCompletion "hnix" ( - dontCheck super.hnix - ); + # 2020-06-05: HACK: does not passes own build suite - `dontCheck` We should + # generate optparse-applicative completions for the hnix executable. Sadly + # building of the executable has been disabled for ghc < 8.10 in hnix. + # Generating the completions should be activated again, once we default to + # ghc 8.10. + hnix = dontCheck super.hnix; # Fails for non-obvious reasons while attempting to use doctest. search = dontCheck super.search; diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix index 7348dd9f22e..cdc36633563 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix @@ -132,4 +132,7 @@ self: super: { excludes = ["package.yaml"]; }); + # hnix 0.9.0 does not provide an executable for ghc < 8.10, so define completions here for now. + hnix = generateOptparseApplicativeCompletion "hnix" super.hnix; + }