mirror of
https://github.com/github/semantic.git
synced 2024-12-24 15:35:14 +03:00
Custom setup.
This commit is contained in:
parent
d559b72464
commit
12aadf6547
25
Setup.hs
25
Setup.hs
@ -1,2 +1,25 @@
|
|||||||
|
import Data.Maybe
|
||||||
|
import qualified Distribution.PackageDescription as PD
|
||||||
import Distribution.Simple
|
import Distribution.Simple
|
||||||
main = defaultMain
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -7,7 +7,7 @@ author: Rob Rix, Josh Vera
|
|||||||
maintainer: rob.rix@github.com
|
maintainer: rob.rix@github.com
|
||||||
copyright: 2015 GitHub
|
copyright: 2015 GitHub
|
||||||
category: Web
|
category: Web
|
||||||
build-type: Simple
|
build-type: Custom
|
||||||
-- extra-source-files:
|
-- extra-source-files:
|
||||||
cabal-version: >=1.10
|
cabal-version: >=1.10
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user