-
Notifications
You must be signed in to change notification settings - Fork 24
/
Setup.hs
21 lines (18 loc) · 881 Bytes
/
Setup.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Control.Monad ( unless )
import Distribution.Simple
import Distribution.Simple.Program.Types ( Program(..), simpleProgram )
import Distribution.PackageDescription ( PackageDescription(..), executables,
hsSourceDirs, exeName, buildInfo )
import Distribution.Simple.LocalBuildInfo ( LocalBuildInfo, buildDir )
import Distribution.Simple.Setup ( BuildFlags, buildVerbose )
import Distribution.Simple.Utils ( rawSystemExit, findProgramVersion)
import Distribution.Verbosity ( Verbosity )
import System.Directory ( doesDirectoryExist )
import System.FilePath ( (</>) )
main = defaultMainWithHooks $
simpleUserHooks { hookedPrograms = [cabalInstallProgram]
}
cabalInstallProgram :: Program
cabalInstallProgram = (simpleProgram "cabal") {
programFindVersion = findProgramVersion "--numeric-version" id
}