aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIku Iwasa <iku.iwasa@gmail.com>2015-04-19 13:38:05 +0100
committerIku Iwasa <iku.iwasa@gmail.com>2015-04-21 00:22:35 +0900
commit9d4e6c3d2411e418743787064da7d4696e7bcf3a (patch)
treee9af2ace88465febb9aa08fa56b3d3537fc1a71e
parent97763f04e4696d3f052bf5e9de86535148e52c44 (diff)
Make it able to find executable on Windows
This adds Cabal dependency to cabal-helper library.
-rw-r--r--Distribution/Helper.hs3
-rw-r--r--cabal-helper.cabal1
2 files changed, 3 insertions, 1 deletions
diff --git a/Distribution/Helper.hs b/Distribution/Helper.hs
index 6946465..323de0e 100644
--- a/Distribution/Helper.hs
+++ b/Distribution/Helper.hs
@@ -63,6 +63,7 @@ import Data.Monoid
import Data.List
import Data.Default
import Data.Typeable
+import Distribution.Simple.BuildPaths (exeExtension)
import System.Environment
import System.FilePath
import System.Directory
@@ -241,7 +242,7 @@ findLibexecExe :: String -> IO FilePath
findLibexecExe "cabal-helper-wrapper" = do
libexecdir <- getLibexecDir
let exeName = "cabal-helper-wrapper"
- exe = libexecdir </> exeName
+ exe = libexecdir </> exeName <.> exeExtension
exists <- doesFileExist exe
diff --git a/cabal-helper.cabal b/cabal-helper.cabal
index 56d85cb..ec35f9d 100644
--- a/cabal-helper.cabal
+++ b/cabal-helper.cabal
@@ -44,6 +44,7 @@ library
, CabalHelper.Types
default-language: Haskell2010
Build-Depends: base >= 4.5 && < 5
+ , Cabal >= 1.14 && < 1.23
, data-default
, directory
, filepath