From c365e153d9379e7a1f5dd7a700aeb5eff619e4f3 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Mon, 12 Jun 2017 03:48:50 +0200 Subject: Fix the build --- .gitlab-ci.yml | 3 +++ Setup.hs | 7 +++++-- cabal-helper.cabal | 1 + tests/Spec.hs | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1134f77..5ac7da4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,10 @@ stages: - build before_script: + - apt-get install -y git + - cabal update + - mkdir -p ../cabal-helper.sdist - ls -l .. - cabal sdist --output-directory=../cabal-helper.sdist diff --git a/Setup.hs b/Setup.hs index 94c8493..202bfb5 100644 --- a/Setup.hs +++ b/Setup.hs @@ -1,7 +1,10 @@ -#!/usr/bin/env runhaskell {-# LANGUAGE CPP, RecordWildCards, NamedFieldPuns #-} -#if defined(MIN_VERSION_Cabal) && MIN_VERSION_Cabal(2,1,0) +#ifndef MIN_VERSION_Cabal +#define MIN_VERSION_Cabal(x,y,z) 0 +#endif + +#if MIN_VERSION_Cabal(2,1,0) -- https://github.com/haskell/cabal/pull/4501 is upstream in 2.0, yey import Distribution.Simple diff --git a/cabal-helper.cabal b/cabal-helper.cabal index 826cd56..6dbe1ef 100644 --- a/cabal-helper.cabal +++ b/cabal-helper.cabal @@ -81,6 +81,7 @@ executable cabal-helper-wrapper CabalHelper.Compile CabalHelper.Log CabalHelper.Sandbox + CabalHelper.Compat.Version ghc-options: -Wall scope: private x-scope: private diff --git a/tests/Spec.hs b/tests/Spec.hs index de7568a..4fe9293 100644 --- a/tests/Spec.hs +++ b/tests/Spec.hs @@ -77,7 +77,7 @@ main = do ]) ] - ghcVer <- majorVer <$> ghcVersion defaultOptions + ghcVer <- ghcVersion defaultOptions let cabalVers = reverse $ concat $ map snd $ dropWhile ((