1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 00:42:33 +03:00

Simple config.

This commit is contained in:
Rob Rix 2015-11-25 16:41:26 -05:00
parent 1d6b804f46
commit beeb759274
2 changed files with 2 additions and 25 deletions

View File

@ -1,25 +1,2 @@
import Data.Maybe
import qualified Distribution.PackageDescription as PD
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo
import System.Directory
main = defaultMainWithHooks simpleUserHooks {
confHook = semanticDiffConfHook
}
semanticDiffConfHook (description, buildInfo) flags = do
localBuildInfo <- confHook simpleUserHooks (description, buildInfo) flags
let packageDescription = localPkgDescr localBuildInfo
library = fromJust $ PD.library packageDescription
libraryBuildInfo = PD.libBuildInfo library
dir <- getCurrentDirectory
return localBuildInfo {
localPkgDescr = packageDescription {
PD.library = Just $ library {
PD.libBuildInfo = libraryBuildInfo {
PD.extraLibDirs = (dir ++ "/prototype/External/tree-sitter/out/Release"):(dir ++ "/prototype/External/tree-sitter-c"):PD.extraLibDirs libraryBuildInfo
}
}
}
}
main = defaultMain

View File

@ -7,7 +7,7 @@ author: Rob Rix, Josh Vera
maintainer: rob.rix@github.com
copyright: 2015 GitHub
category: Web
build-type: Custom
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10