summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-31 12:03:19 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-31 12:03:19 -0400
commit56af847caaf4a65b1dd06322ecdf67ce6a349ae7 (patch)
tree3161ea0a702dcfbdf2588c1e9a0bff4957a4b475
parent5bd997882ccfe9ee04f458756dcb84eb3ec7bd0c (diff)
switch Setup file to use postCopy hook, since cabal has stopped running postInst5.20150731
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.
-rw-r--r--Setup.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Setup.hs b/Setup.hs
index 15447b0e3..f90a9b2e5 100644
--- a/Setup.hs
+++ b/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 =