switch Setup file to use postCopy hook, since cabal has stopped running postInst
See https://github.com/haskell/cabal/issues/1805 Apparently, old versions of cabal don't run copyHook, but at the moment I don't know who would be using a cabal as old as 1.18, and it seems a lot of complication to run both hooks. Although I think my code is idempotent, so they could both be used if necessary.
This commit is contained in:
parent
e954b165a1
commit
dace1f3162
1 changed files with 4 additions and 4 deletions
8
Setup.hs
8
Setup.hs
|
@ -23,17 +23,17 @@ main = defaultMainWithHooks simpleUserHooks
|
|||
{ preConf = \_ _ -> do
|
||||
Configure.run Configure.tests
|
||||
return (Nothing, [])
|
||||
, postInst = myPostInst
|
||||
, postCopy = myPostCopy
|
||||
}
|
||||
|
||||
myPostInst :: Args -> InstallFlags -> PackageDescription -> LocalBuildInfo -> IO ()
|
||||
myPostInst _ (InstallFlags { installVerbosity }) pkg lbi = do
|
||||
myPostCopy :: Args -> CopyFlags -> PackageDescription -> LocalBuildInfo -> IO ()
|
||||
myPostCopy _ (CopyFlags { copyVerbosity }) pkg lbi = do
|
||||
installGitAnnexShell dest verbosity pkg lbi
|
||||
installManpages dest verbosity pkg lbi
|
||||
installDesktopFile dest verbosity pkg lbi
|
||||
where
|
||||
dest = NoCopyDest
|
||||
verbosity = fromFlag installVerbosity
|
||||
verbosity = fromFlag copyVerbosity
|
||||
|
||||
installGitAnnexShell :: CopyDest -> Verbosity -> PackageDescription -> LocalBuildInfo -> IO ()
|
||||
installGitAnnexShell copyDest verbosity pkg lbi =
|
||||
|
|
Loading…
Reference in a new issue