summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2020-12-01 23:11:59 +0100
committertv <tv@krebsco.de>2020-12-02 00:43:13 +0100
commit29827720520b6a4885dbdcb3237070e6e45dd910 (patch)
tree65bdf5b61b614a52145f3583609eac0075dc21d0
parent08e9db31d6b20cbef0a10414e135cb58b39f91e5 (diff)
cabal-read: make compatible with Cabal >=3.0.0
-rw-r--r--krebs/5pkgs/simple/cabal-read.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/krebs/5pkgs/simple/cabal-read.nix b/krebs/5pkgs/simple/cabal-read.nix
index f8fc71e05..03b42ef2c 100644
--- a/krebs/5pkgs/simple/cabal-read.nix
+++ b/krebs/5pkgs/simple/cabal-read.nix
@@ -5,6 +5,7 @@ writeHaskellPackage "cabal-read" {
executables.ghc-options = {
extra-depends = ["Cabal"];
text = /* haskell */ ''
+ {-# LANGUAGE CPP #-}
module Main (main) where
import Data.List
import Data.Maybe
@@ -26,6 +27,9 @@ writeHaskellPackage "cabal-read" {
case lookup (mkUnqualComponentName name) (condExecutables desc) of
Just exe ->
putStrLn . intercalate " " . fromMaybe [] . lookup GHC
+ #if MIN_VERSION_Cabal(3,0,0)
+ . perCompilerFlavorToList
+ #endif
. options . buildInfo . condTreeData $ exe
Nothing ->