From b37db3928282639d6cb604d64a5ba600016863f3 Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Sat, 20 Mar 2021 12:08:03 +0100 Subject: [PATCH] haskellPackages.niv: Fix build --- .../haskell-modules/configuration-common.nix | 5 ++++- .../configuration-hackage2nix.yaml | 1 + .../haskell-modules/hackage-packages.nix | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 0bfe615c31bf7f..18d85c5775edca 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -946,7 +946,10 @@ self: super: { # Generate shell completion. cabal2nix = generateOptparseApplicativeCompletion "cabal2nix" super.cabal2nix; - niv = generateOptparseApplicativeCompletion "niv" super.niv; + niv = generateOptparseApplicativeCompletion "niv" (super.niv.overrideScope (self: super: { + # Needs override because of: https://github.com/nmattia/niv/issues/312 + optparse-applicative = self.optparse-applicative_0_15_1_0; + })); ormolu = generateOptparseApplicativeCompletion "ormolu" super.ormolu; stack = generateOptparseApplicativeCompletion "stack" super.stack; diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml index fe51ebadbd3d95..08fb8aa88f7547 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml @@ -2753,6 +2753,7 @@ extra-packages: - haskell-lsp == 0.23.0.0 # required by hls-plugin-api 0.7.0.0, 2021-02-08 - haskell-lsp-types == 0.23.0.0 # required by hls-plugin-api 0.7.0.0, 2021-02-08 - lsp-test == 0.11.0.7 # required by hls-plugin-api 0.7.0.0, 2021-02-08 + - optparse-applicative < 0.16 # needed for niv-0.2.19 package-maintainers: peti: diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index c94d9153359b20..345632ddd8b4d0 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -192102,6 +192102,25 @@ self: { broken = true; }) {}; + "optparse-applicative_0_15_1_0" = callPackage + ({ mkDerivation, ansi-wl-pprint, base, bytestring, process + , QuickCheck, transformers, transformers-compat + }: + mkDerivation { + pname = "optparse-applicative"; + version = "0.15.1.0"; + sha256 = "1ws6y3b3f6hsgv0ff0yp6lw4hba1rps4dnvry3yllng0s5gngcsd"; + revision = "1"; + editedCabalFile = "0zmhqkd96v2z1ilhqdkd9z4jgsnsxb8yi2479ind8m5zm9363zr9"; + libraryHaskellDepends = [ + ansi-wl-pprint base process transformers transformers-compat + ]; + testHaskellDepends = [ base bytestring QuickCheck ]; + description = "Utilities and combinators for parsing command line options"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + }) {}; + "optparse-applicative" = callPackage ({ mkDerivation, ansi-wl-pprint, base, process, QuickCheck , transformers, transformers-compat