From 43da01b0c956fc11f62fc720e74ee3b828e6ef8d Mon Sep 17 00:00:00 2001 From: Naïm Favier Date: Tue, 7 Feb 2023 18:59:47 +0100 Subject: haskellPackages: remove unused patches --- .../patches/amazonka-Allow-http-client-0.6.patch | 24 -- .../amazonka-core-Allow-http-client-0.6.patch | 26 -- .../darcs-2.14.2-Compile-against-GHC-8.8.patch | 333 ------------------ .../haskell-modules/patches/darcs-setup.patch | 120 ------- .../patches/fix-dbus-for-ghc-8.10.x.patch | 383 --------------------- .../patches/ghc-paths-nix-ghcjs.patch | 65 ---- .../haskell-modules/patches/hunspell.patch | 30 -- 7 files changed, 981 deletions(-) delete mode 100644 pkgs/development/haskell-modules/patches/amazonka-Allow-http-client-0.6.patch delete mode 100644 pkgs/development/haskell-modules/patches/amazonka-core-Allow-http-client-0.6.patch delete mode 100644 pkgs/development/haskell-modules/patches/darcs-2.14.2-Compile-against-GHC-8.8.patch delete mode 100644 pkgs/development/haskell-modules/patches/darcs-setup.patch delete mode 100644 pkgs/development/haskell-modules/patches/fix-dbus-for-ghc-8.10.x.patch delete mode 100644 pkgs/development/haskell-modules/patches/ghc-paths-nix-ghcjs.patch delete mode 100644 pkgs/development/haskell-modules/patches/hunspell.patch (limited to 'pkgs/development/haskell-modules/patches') diff --git a/pkgs/development/haskell-modules/patches/amazonka-Allow-http-client-0.6.patch b/pkgs/development/haskell-modules/patches/amazonka-Allow-http-client-0.6.patch deleted file mode 100644 index 9e1eeb751602..000000000000 --- a/pkgs/development/haskell-modules/patches/amazonka-Allow-http-client-0.6.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 657b70d174fe5cb61e56cb8b9c5e57f1ec216f2b Mon Sep 17 00:00:00 2001 -From: Mikhail Glushenkov -Date: Wed, 10 Apr 2019 17:42:57 +0100 -Subject: [PATCH] Allow http-client 0.6.*. - -Changelog doesn't list any silently breaking semantic changes. ---- - amazonka/amazonka.cabal | 2 +- - core/amazonka-core.cabal | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/amazonka/amazonka.cabal b/amazonka/amazonka.cabal -index e86713f11c..81c4cb7e48 100644 ---- a/amazonka.cabal -+++ b/amazonka.cabal -@@ -67,7 +67,7 @@ library - , conduit-extra >= 1.1 - , directory >= 1.2 - , exceptions >= 0.6 -- , http-client >= 0.4 && < 0.6 -+ , http-client >= 0.4 && < 0.7 - , http-conduit >= 2.1.7 && < 3 - , http-types >= 0.8 - , ini >= 0.3.5 diff --git a/pkgs/development/haskell-modules/patches/amazonka-core-Allow-http-client-0.6.patch b/pkgs/development/haskell-modules/patches/amazonka-core-Allow-http-client-0.6.patch deleted file mode 100644 index d99072d79c6e..000000000000 --- a/pkgs/development/haskell-modules/patches/amazonka-core-Allow-http-client-0.6.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 657b70d174fe5cb61e56cb8b9c5e57f1ec216f2b Mon Sep 17 00:00:00 2001 -From: Mikhail Glushenkov -Date: Wed, 10 Apr 2019 17:42:57 +0100 -Subject: [PATCH] Allow http-client 0.6.*. - -Changelog doesn't list any silently breaking semantic changes. ---- - amazonka/amazonka.cabal | 2 +- - core/amazonka-core.cabal | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/core/amazonka-core.cabal b/core/amazonka-core.cabal -index 9796e007cf..eccb24e5bd 100644 ---- a/amazonka-core.cabal -+++ b/amazonka-core.cabal -@@ -90,7 +90,7 @@ library - , deepseq >= 1.4 - , exceptions >= 0.6 - , hashable >= 1.2 -- , http-client >= 0.4 && < 0.6 -+ , http-client >= 0.4 && < 0.7 - , http-conduit >= 2.1.4 && < 3 - , http-types >= 0.8 && (<0.11 || >=0.12) - , lens >= 4.4 --- -2.23.0 diff --git a/pkgs/development/haskell-modules/patches/darcs-2.14.2-Compile-against-GHC-8.8.patch b/pkgs/development/haskell-modules/patches/darcs-2.14.2-Compile-against-GHC-8.8.patch deleted file mode 100644 index 04ff068e1d02..000000000000 --- a/pkgs/development/haskell-modules/patches/darcs-2.14.2-Compile-against-GHC-8.8.patch +++ /dev/null @@ -1,333 +0,0 @@ -From 2490fa65eeba52699a7c0e303aa5cb9b78c2b1cf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= -Date: Fri, 17 Apr 2020 20:49:23 +0200 -Subject: [PATCH] Compile against GHC 8.8 - ---- - Setup.hs | 15 --------------- - src/Darcs/Patch/Depends.hs | 2 +- - src/Darcs/Patch/Match.hs | 12 ++++++------ - src/Darcs/Patch/PatchInfoAnd.hs | 2 +- - src/Darcs/Patch/Prim/V1/Apply.hs | 6 +++--- - src/Darcs/Patch/Prim/V1/Commute.hs | 1 + - src/Darcs/Patch/ReadMonads.hs | 1 + - src/Darcs/Patch/V1/Commute.hs | 1 + - src/Darcs/Repository/Diff.hs | 2 +- - src/Darcs/Repository/Match.hs | 2 +- - src/Darcs/Util/Tree/Monad.hs | 4 ++-- - 12 files changed, 30 insertions(+), 42 deletions(-) - -diff --git a/Setup.hs b/Setup.hs -index f5cc3e8..05caac4 100644 ---- a/Setup.hs -+++ b/Setup.hs -@@ -75,21 +75,6 @@ - postInst = \ _ flags pkg lbi -> - installManpage pkg lbi (fromFlag $ installVerbosity flags) NoCopyDest, - -- sDistHook = \ pkg lbi hooks flags -> do -- let pkgVer = packageVersion pkg -- verb = fromFlag $ sDistVerbosity flags -- x <- versionPatches verb pkgVer -- y <- context verb -- rewriteFileEx silent "release/distributed-version" $ show x -- rewriteFileEx silent "release/distributed-context" $ show y -- putStrLn "about to hand over" -- let pkg' = pkg { library = sanity (library pkg) } -- sanity (Just lib) = Just $ lib { libBuildInfo = sanity' $ libBuildInfo lib } -- sanity _ = error "eh" -- sanity' bi = bi { otherModules = [ m | m <- otherModules bi, toFilePath m /= "Version" ] } -- -- sDistHook simpleUserHooks pkg' lbi hooks flags -- , - postConf = \_ _ _ _ -> return () --- Usually this checked for external C - --- dependencies, but we already have performed such - --- check in the confHook ---- a/darcs.cabal 1970-01-01 01:00:01.000000000 +0100 -+++ b/darcs.cabal 2020-04-18 10:26:07.605129733 +0200 -@@ -1,6 +1,5 @@ - Name: darcs - version: 2.14.2 --x-revision: 1 - License: GPL-2 - License-file: COPYING - Author: David Roundy , -@@ -75,7 +74,7 @@ - description: Use libcurl for HTTP support. - - -- in future this could extend to any other external libraries, ---- e.g. libiconv -+-- e.g. libiconv - flag pkgconfig - description: Use pkgconfig to configure libcurl - default: False -@@ -113,7 +112,7 @@ - -- ---------------------------------------------------------------------- - - custom-setup -- setup-depends: base >= 4.9 && < 4.13, -+ setup-depends: base >= 4.9 && <5, - Cabal >= 1.24, - process >= 1.2.3.0 && < 1.7, - filepath >= 1.4.1 && < 1.5.0.0, -@@ -381,7 +380,7 @@ - else - build-depends: unix >= 2.7.1.0 && < 2.8 - -- build-depends: base >= 4.9 && < 4.13, -+ build-depends: base >= 4.9 && <5, - stm >= 2.1 && < 2.6, - binary >= 0.5 && < 0.10, - containers >= 0.5.6.2 && < 0.7, -@@ -402,19 +401,19 @@ - tar >= 0.5 && < 0.6, - data-ordlist == 0.4.*, - attoparsec >= 0.13.0.1 && < 0.14, -- zip-archive >= 0.3 && < 0.5, -+ zip-archive >= 0.3 && <1, - async >= 2.0.2 && < 2.3, -- sandi >= 0.4 && < 0.6, -+ sandi >= 0.4 && <1, - unix-compat >= 0.4.2 && < 0.6, - bytestring >= 0.10.6 && < 0.11, - old-time >= 1.1.0.3 && < 1.2, - time >= 1.5.0.1 && < 1.10, -- text >= 1.2.1.3 && < 1.3, -+ text >= 1.2.1.3 && <2, - directory >= 1.2.6.2 && < 1.4, - process >= 1.2.3.0 && < 1.7, - array >= 0.5.1.0 && < 0.6, - random >= 1.1 && < 1.2, -- hashable >= 1.2.3.3 && < 1.3, -+ hashable >= 1.2.3.3 && <2, - mmap >= 0.5.9 && < 0.6, - zlib >= 0.6.1.2 && < 0.7.0.0, - network-uri == 2.6.*, -@@ -443,7 +442,7 @@ - - -- The terminfo package cannot be built on Windows. - if flag(terminfo) && !os(windows) -- build-depends: terminfo >= 0.4.0.2 && < 0.5 -+ build-depends: terminfo >= 0.4.0.2 && <1 - cpp-options: -DHAVE_TERMINFO - - default-extensions: -@@ -500,7 +499,7 @@ - cc-options: -D_REENTRANT - - build-depends: darcs, -- base >= 4.9 && < 4.13 -+ base >= 4.9 && <5 - - -- ---------------------------------------------------------------------- - -- unit test driver -@@ -518,7 +517,7 @@ - build-depends: Win32 >= 2.3.1 && < 2.4 - - build-depends: darcs, -- base >= 4.9 && < 4.13, -+ base >= 4.9 && <5, - array >= 0.5.1.0 && < 0.6, - bytestring >= 0.10.6 && < 0.11, - cmdargs >= 0.10.10 && < 0.11, -@@ -527,15 +526,15 @@ - mtl >= 2.2.1 && < 2.3, - shelly >= 1.6.8 && < 1.9, - split >= 0.2.2 && < 0.3, -- text >= 1.2.1.3 && < 1.3, -+ text >= 1.2.1.3 && <2, - directory >= 1.2.6.2 && < 1.4, - FindBin >= 0.0.5 && < 0.1, -- QuickCheck >= 2.8.2 && < 2.13, -+ QuickCheck >= 2.8.2 && <3, - HUnit >= 1.3 && < 1.7, - test-framework >= 0.8.1.1 && < 0.9, - test-framework-hunit >= 0.3.0.2 && < 0.4, - test-framework-quickcheck2 >= 0.3.0.3 && < 0.4, -- zip-archive >= 0.3 && < 0.5 -+ zip-archive >= 0.3 && <1 - - -- https://github.com/yesodweb/Shelly.hs/issues/177 - if os(windows) -diff --git a/src/Darcs/Patch/Depends.hs b/src/Darcs/Patch/Depends.hs -index 8531294..a4c71cb 100644 ---- a/src/Darcs/Patch/Depends.hs -+++ b/src/Darcs/Patch/Depends.hs -@@ -251,7 +251,7 @@ splitOnTag _ (PatchSet NilRL NilRL) = Nothing - unwrapOneTagged :: (Monad m) => PatchSet rt p wX wY -> m (PatchSet rt p wX wY) - unwrapOneTagged (PatchSet (ts :<: Tagged t _ tps) ps) = - return $ PatchSet ts (tps :<: t +<+ ps) --unwrapOneTagged _ = fail "called unwrapOneTagged with no Tagged's in the set" -+unwrapOneTagged _ = error "called unwrapOneTagged with no Tagged's in the set" - - -- | @getUncovered ps@ returns the 'PatchInfo' for all the patches in - -- @ps@ that are not depended on by anything else *through explicit -diff --git a/src/Darcs/Patch/Match.hs b/src/Darcs/Patch/Match.hs -index aba6c7a..2b6f53a 100644 ---- a/src/Darcs/Patch/Match.hs -+++ b/src/Darcs/Patch/Match.hs -@@ -421,7 +421,7 @@ getNonrangeMatchS fs repo = - Just m -> if nonrangeMatcherIsTag fs - then getTagS m repo - else getMatcherS Exclusive m repo -- Nothing -> fail "Pattern not specified in getNonrangeMatch." -+ Nothing -> error "Pattern not specified in getNonrangeMatch." - - -- | @firstMatch fs@ tells whether @fs@ implies a "first match", that - -- is if we match against patches from a point in the past on, rather -@@ -441,7 +441,7 @@ getFirstMatchS fs repo = - Just (_,b) -> unpullLastN repo b -- b is chronologically earlier than a - Nothing -> - case firstMatcher fs of -- Nothing -> fail "Pattern not specified in getFirstMatchS." -+ Nothing -> error "Pattern not specified in getFirstMatchS." - Just m -> if firstMatcherIsTag fs - then getTagS m repo - else getMatcherS Inclusive m repo -@@ -462,7 +462,7 @@ checkMatchSyntax :: [MatchFlag] -> IO () - checkMatchSyntax opts = - case getMatchPattern opts of - Nothing -> return () -- Just p -> either fail (const $ return ()) (parseMatch p::Either String (MatchFun rt DummyPatch)) -+ Just p -> either error (const $ return ()) (parseMatch p::Either String (MatchFun rt DummyPatch)) - - getMatchPattern :: [MatchFlag] -> Maybe String - getMatchPattern [] = Nothing -@@ -718,7 +718,7 @@ getMatcherS :: (ApplyMonad (ApplyState p) m, Matchable p) => - getMatcherS ioe m repo = - if matchExists m repo - then applyInvToMatcher ioe m repo -- else fail $ "Couldn't match pattern "++ show m -+ else error $ "Couldn't match pattern "++ show m - - getTagS :: (ApplyMonad (ApplyState p) m, MonadProgress m, Matchable p) => - Matcher rt p -> PatchSet rt p Origin wX -> m () -diff --git a/src/Darcs/Patch/PatchInfoAnd.hs b/src/Darcs/Patch/PatchInfoAnd.hs -index 2da7ec8..1147410 100644 ---- a/src/Darcs/Patch/PatchInfoAnd.hs -+++ b/src/Darcs/Patch/PatchInfoAnd.hs -@@ -167,7 +167,7 @@ conscientiously er (PIAP pinf hp) = - - -- | @hopefullyM@ is a version of @hopefully@ which calls @fail@ in a - -- monad instead of erroring. --hopefullyM :: Monad m => PatchInfoAnd rt p wA wB -> m (WrappedNamed rt p wA wB) -+hopefullyM :: MonadFail m => PatchInfoAnd rt p wA wB -> m (WrappedNamed rt p wA wB) - hopefullyM (PIAP pinf hp) = case hopefully2either hp of - Right p -> return p - Left e -> fail $ renderString -diff --git a/src/Darcs/Patch/Prim/V1/Apply.hs b/src/Darcs/Patch/Prim/V1/Apply.hs -index bea7e41..7984d21 100644 ---- a/src/Darcs/Patch/Prim/V1/Apply.hs -+++ b/src/Darcs/Patch/Prim/V1/Apply.hs -@@ -41,13 +41,13 @@ instance Apply Prim where - apply (FP f (TokReplace t o n)) = mModifyFilePS f doreplace - where doreplace fc = - case tryTokReplace t (BC.pack o) (BC.pack n) fc of -- Nothing -> fail $ "replace patch to " ++ fn2fp f -+ Nothing -> error $ "replace patch to " ++ fn2fp f - ++ " couldn't apply." - Just fc' -> return fc' - apply (FP f (Binary o n)) = mModifyFilePS f doapply - where doapply oldf = if o == oldf - then return n -- else fail $ "binary patch to " ++ fn2fp f -+ else error $ "binary patch to " ++ fn2fp f - ++ " couldn't apply." - apply (DP d AddDir) = mCreateDirectory d - apply (DP d RmDir) = mRemoveDirectory d -@@ -115,7 +115,7 @@ applyHunk f h fc = - case applyHunkLines h fc of - Right fc' -> return fc' - Left msg -> -- fail $ -+ error $ - "### Error applying:\n" ++ renderHunk h ++ - "\n### to file " ++ fn2fp f ++ ":\n" ++ BC.unpack fc ++ - "### Reason: " ++ msg -diff --git a/src/Darcs/Patch/Prim/V1/Commute.hs b/src/Darcs/Patch/Prim/V1/Commute.hs -index 7639dbd..e1432e6 100644 ---- a/src/Darcs/Patch/Prim/V1/Commute.hs -+++ b/src/Darcs/Patch/Prim/V1/Commute.hs -@@ -58,6 +58,7 @@ instance Monad Perhaps where - Failed >>= _ = Failed - Unknown >>= _ = Unknown - return = Succeeded -+instance MonadFail Perhaps where - fail _ = Unknown - - instance Alternative Perhaps where -diff --git a/src/Darcs/Patch/ReadMonads.hs b/src/Darcs/Patch/ReadMonads.hs -index 62a4f81..e1cb149 100644 ---- a/src/Darcs/Patch/ReadMonads.hs -+++ b/src/Darcs/Patch/ReadMonads.hs -@@ -237,6 +237,7 @@ failSM _ = SM (\_ -> Nothing) - instance Monad SM where - (>>=) = bindSM - return = returnSM -+instance MonadFail SM where - fail = failSM - - instance ParserM SM where -diff --git a/src/Darcs/Patch/V1/Commute.hs b/src/Darcs/Patch/V1/Commute.hs -index 0bb41a3..c6c3382 100644 ---- a/src/Darcs/Patch/V1/Commute.hs -+++ b/src/Darcs/Patch/V1/Commute.hs -@@ -93,6 +93,7 @@ instance Monad Perhaps where - Failed >>= _ = Failed - Unknown >>= _ = Unknown - return = Succeeded -+instance MonadFail Perhaps where - fail _ = Unknown - - instance Alternative Perhaps where -diff --git a/src/Darcs/Repository/Diff.hs b/src/Darcs/Repository/Diff.hs -index 8078d49..e0e2341 100644 ---- a/src/Darcs/Repository/Diff.hs -+++ b/src/Darcs/Repository/Diff.hs -@@ -138,7 +138,7 @@ treeDiff da ft t1 t2 = do - do rmDirP <- diff p (Removed subtree) - addFileP <- diff p (Changed (File emptyBlob) b') - return $ joinGap (+>+) rmDirP addFileP -- diff p _ = fail $ "Missing case at path " ++ show p -+ diff p _ = error $ "Missing case at path " ++ show p - - text_diff p a b - | BL.null a && BL.null b = emptyGap NilFL -diff --git a/src/Darcs/Repository/Match.hs b/src/Darcs/Repository/Match.hs -index 08c9f13..f33cabe 100644 ---- a/src/Darcs/Repository/Match.hs -+++ b/src/Darcs/Repository/Match.hs -@@ -60,7 +60,7 @@ getNonrangeMatch :: (ApplyMonad (ApplyState p) DefaultIO, IsRepoType rt, RepoPat - getNonrangeMatch r = withRecordedMatch r . getMatch where - getMatch fs = case hasIndexRange fs of - Just (n, m) | n == m -> applyNInv (n-1) -- | otherwise -> fail "Index range is not allowed for this command." -+ | otherwise -> error "Index range is not allowed for this command." - _ -> getNonrangeMatchS fs - - getOnePatchset :: (IsRepoType rt, RepoPatch p) -diff --git a/src/Darcs/Util/Tree/Monad.hs b/src/Darcs/Util/Tree/Monad.hs -index 0e01d9b..296fdc4 100644 ---- a/src/Darcs/Util/Tree/Monad.hs -+++ b/src/Darcs/Util/Tree/Monad.hs -@@ -216,7 +216,7 @@ instance (Monad m) => TreeRO (TreeMonad m) where - t <- gets tree - let f = findFile t p' - case f of -- Nothing -> fail $ "No such file " ++ show p' -+ Nothing -> error $ "No such file " ++ show p' - Just x -> lift (readBlob x) - - currentDirectory = ask -@@ -251,7 +251,7 @@ instance (Monad m) => TreeRW (TreeMonad m) where - let item = find tr from' - found_to = find tr to' - unless (isNothing found_to) $ -- fail $ "Error renaming: destination " ++ show to ++ " exists." -+ error $ "Error renaming: destination " ++ show to ++ " exists." - unless (isNothing item) $ do - modifyItem from Nothing - modifyItem to item --- -2.23.1 - diff --git a/pkgs/development/haskell-modules/patches/darcs-setup.patch b/pkgs/development/haskell-modules/patches/darcs-setup.patch deleted file mode 100644 index fbc7efde428e..000000000000 --- a/pkgs/development/haskell-modules/patches/darcs-setup.patch +++ /dev/null @@ -1,120 +0,0 @@ ---- darcs-2.14.2/Setup.hs 2019-01-27 03:14:51.000000000 +1300 -+++ darcs.net/Setup.hs 2019-10-18 02:41:57.000000000 +1300 -@@ -11,7 +11,9 @@ - , TestSuite(testBuildInfo) - , updatePackageDescription - , cppOptions, ccOptions -- , library, libBuildInfo, otherModules ) -+ , library, libBuildInfo, otherModules -+ , ComponentName(CExeName) -+ ) - import Distribution.Package - ( packageVersion ) - import Distribution.Version( Version ) -@@ -21,24 +23,27 @@ - import Distribution.Simple.Setup - (buildVerbosity, copyDest, copyVerbosity, fromFlag, - haddockVerbosity, installVerbosity, sDistVerbosity, replVerbosity ) --import Distribution.Simple.BuildPaths ( autogenModulesDir ) -+import Distribution.Simple.BuildPaths ( autogenPackageModulesDir ) - import Distribution.System - ( OS(Windows), buildOS ) - import Distribution.Simple.Utils - (copyFiles, createDirectoryIfMissingVerbose, rawSystemStdout, -- rewriteFile ) -+ rewriteFileEx) -+import Distribution.Types.UnqualComponentName - import Distribution.Verbosity -- ( Verbosity ) -+ ( Verbosity, silent ) - import Distribution.Text - ( display ) --import Control.Monad ( unless, void ) - -+import Control.Monad ( unless, when, void ) - import System.Directory - ( doesDirectoryExist, doesFileExist ) - import System.IO - ( openFile, IOMode(..) ) - import System.Process (runProcess) - import Data.List( isInfixOf, lines ) -+import qualified Data.Map as M -+import Data.Maybe ( isJust ) - import System.FilePath ( () ) - import Foreign.Marshal.Utils ( with ) - import Foreign.Storable ( peek ) -@@ -75,8 +80,8 @@ - verb = fromFlag $ sDistVerbosity flags - x <- versionPatches verb pkgVer - y <- context verb -- rewriteFile "release/distributed-version" $ show x -- rewriteFile "release/distributed-context" $ show y -+ rewriteFileEx silent "release/distributed-version" $ show x -+ rewriteFileEx silent "release/distributed-context" $ show y - putStrLn "about to hand over" - let pkg' = pkg { library = sanity (library pkg) } - sanity (Just lib) = Just $ lib { libBuildInfo = sanity' $ libBuildInfo lib } -@@ -105,8 +110,7 @@ - littleEndian <- testEndianness - let args = ("-DPACKAGE_VERSION=" ++ show' version) : - [arg | (arg, True) <- -- include fst iff snd. -- [-- We have MAPI iff building on/for Windows. -- ("-DHAVE_MAPI", buildOS == Windows), -+ [ - ("-DLITTLEENDIAN", littleEndian), - ("-DBIGENDIAN", not littleEndian)]] - bi = emptyBuildInfo { cppOptions = args, ccOptions = args } -@@ -133,20 +137,26 @@ - -- man page - -- --------------------------------------------------------------------- - -+hasDarcsExe :: LocalBuildInfo -> Bool -+hasDarcsExe = isJust . M.lookup darcsExe . componentNameMap where -+ darcsExe = CExeName (mkUnqualComponentName "darcs") -+ - buildManpage :: LocalBuildInfo -> IO () --buildManpage lbi = do -- let darcs = buildDir lbi "darcs/darcs" -- manpage = buildDir lbi "darcs/darcs.1" -- manpageHandle <- openFile manpage WriteMode -- void $ runProcess darcs ["help","manpage"] -- Nothing Nothing Nothing (Just manpageHandle) Nothing -+buildManpage lbi = -+ when (hasDarcsExe lbi) $ do -+ let darcs = buildDir lbi "darcs/darcs" -+ manpage = buildDir lbi "darcs/darcs.1" -+ manpageHandle <- openFile manpage WriteMode -+ void $ runProcess darcs ["help","manpage"] -+ Nothing Nothing Nothing (Just manpageHandle) Nothing - --installManpage :: PackageDescription -> LocalBuildInfo -- -> Verbosity -> CopyDest -> IO () -+installManpage :: PackageDescription -> LocalBuildInfo -> Verbosity -> CopyDest -> IO () - installManpage pkg lbi verbosity copy = -- copyFiles verbosity -- (mandir (absoluteInstallDirs pkg lbi copy) "man1") -- [(buildDir lbi "darcs", "darcs.1")] -+ when (hasDarcsExe lbi) $ -+ copyFiles -+ verbosity -+ (mandir (absoluteInstallDirs pkg lbi copy) "man1") -+ [(buildDir lbi "darcs", "darcs.1")] - - -- --------------------------------------------------------------------- - -- version module -@@ -187,12 +197,13 @@ - generateVersionModule :: Verbosity -> LocalBuildInfo - -> String -> String -> IO () - generateVersionModule verbosity lbi version state = do -- let dir = autogenModulesDir lbi -+ let dir = autogenPackageModulesDir lbi - createDirectoryIfMissingVerbose verbosity True dir - ctx <- context verbosity - hash <- weakhash verbosity -- rewriteFile (dir "Version.hs") $ unlines -+ rewriteFileEx silent (dir "Version.hs") $ unlines - ["module Version where" -+ ,"import Darcs.Prelude" - ,"version, weakhash, context :: String" - ,"version = \"" ++ version ++ " (" ++ state ++ ")\"" - ,"weakhash = " ++ case hash of diff --git a/pkgs/development/haskell-modules/patches/fix-dbus-for-ghc-8.10.x.patch b/pkgs/development/haskell-modules/patches/fix-dbus-for-ghc-8.10.x.patch deleted file mode 100644 index 7ed390d3f237..000000000000 --- a/pkgs/development/haskell-modules/patches/fix-dbus-for-ghc-8.10.x.patch +++ /dev/null @@ -1,383 +0,0 @@ -Only in dbus-1.2.13-new: .codeclimate.yml -diff -ur dbus-1.2.13-old/dbus.cabal dbus-1.2.13-new/dbus.cabal ---- dbus-1.2.13-old/dbus.cabal 2020-04-25 19:29:27.372272952 +0200 -+++ dbus-1.2.13-new/dbus.cabal 2020-04-25 19:26:36.140991920 +0200 -@@ -1,172 +1,180 @@ --cabal-version: >=1.8 - name: dbus - version: 1.2.13 - license: Apache-2.0 - license-file: license.txt --maintainer: Andrey Sverdlichenko - author: John Millikin -+maintainer: Andrey Sverdlichenko -+build-type: Simple -+cabal-version: >= 1.8 -+category: Network, Desktop - stability: experimental - homepage: https://github.com/rblaze/haskell-dbus#readme -+ - synopsis: A client library for the D-Bus IPC system. - description: -- D-Bus is a simple, message-based protocol for inter-process -- communication, which allows applications to interact with other parts of -- the machine and the user's session using remote procedure calls. -- . -- D-Bus is a essential part of the modern Linux desktop, where it replaces -- earlier protocols such as CORBA and DCOP. -- . -- This library is an implementation of the D-Bus protocol in Haskell. It -- can be used to add D-Bus support to Haskell applications, without the -- awkward interfaces common to foreign bindings. -- . -- Example: connect to the session bus, and get a list of active names. -- . -- @ -- {-\# LANGUAGE OverloadedStrings \#-} -- . -- import Data.List (sort) -- import DBus -- import DBus.Client -- . -- main = do -- client <- connectSession -- // -- \-- Request a list of connected clients from the bus -- reply <- call_ client (methodCall \"\/org\/freedesktop\/DBus\" \"org.freedesktop.DBus\" \"ListNames\") -- { methodCallDestination = Just \"org.freedesktop.DBus\" -- } -- // -- \-- org.freedesktop.DBus.ListNames() returns a single value, which is -- \-- a list of names (here represented as [String]) -- let Just names = fromVariant (methodReturnBody reply !! 0) -- // -- \-- Print each name on a line, sorted so reserved names are below -- \-- temporary names. -- mapM_ putStrLn (sort names) -- @ -- . -- >$ ghc --make list-names.hs -- >$ ./list-names -- >:1.0 -- >:1.1 -- >:1.10 -- >:1.106 -- >:1.109 -- >:1.110 -- >ca.desrt.dconf -- >org.freedesktop.DBus -- >org.freedesktop.Notifications -- >org.freedesktop.secrets -- >org.gnome.ScreenSaver --category: Network, Desktop --build-type: Simple -+ D-Bus is a simple, message-based protocol for inter-process -+ communication, which allows applications to interact with other parts of -+ the machine and the user's session using remote procedure calls. -+ . -+ D-Bus is a essential part of the modern Linux desktop, where it replaces -+ earlier protocols such as CORBA and DCOP. -+ . -+ This library is an implementation of the D-Bus protocol in Haskell. It -+ can be used to add D-Bus support to Haskell applications, without the -+ awkward interfaces common to foreign bindings. -+ . -+ Example: connect to the session bus, and get a list of active names. -+ . -+ @ -+ {-\# LANGUAGE OverloadedStrings \#-} -+ . -+ import Data.List (sort) -+ import DBus -+ import DBus.Client -+ . -+ main = do -+ client <- connectSession -+ -+ -- Request a list of connected clients from the bus -+ reply <- call_ client (methodCall \"\/org\/freedesktop\/DBus\" \"org.freedesktop.DBus\" \"ListNames\") -+ { methodCallDestination = Just \"org.freedesktop.DBus\" -+ } -+ -+ -- org.freedesktop.DBus.ListNames() returns a single value, which is -+ -- a list of names (here represented as [String]) -+ let Just names = fromVariant (methodReturnBody reply !! 0) -+ -+ -- Print each name on a line, sorted so reserved names are below -+ -- temporary names. -+ mapM_ putStrLn (sort names) -+ @ -+ . -+ >$ ghc --make list-names.hs -+ >$ ./list-names -+ >:1.0 -+ >:1.1 -+ >:1.10 -+ >:1.106 -+ >:1.109 -+ >:1.110 -+ >ca.desrt.dconf -+ >org.freedesktop.DBus -+ >org.freedesktop.Notifications -+ >org.freedesktop.secrets -+ >org.gnome.ScreenSaver -+ -+ - extra-source-files: -- examples/dbus-monitor.hs -- examples/export.hs -- examples/introspect.hs -- examples/list-names.hs -- idlxml/dbus.xml -+ examples/dbus-monitor.hs -+ examples/export.hs -+ examples/introspect.hs -+ examples/list-names.hs -+ idlxml/dbus.xml - - source-repository head -- type: git -- location: https://github.com/rblaze/haskell-dbus -+ type: git -+ location: https://github.com/rblaze/haskell-dbus - - library -- exposed-modules: -- DBus -- DBus.Client -- DBus.Generation -- DBus.Internal.Address -- DBus.Internal.Message -- DBus.Internal.Types -- DBus.Internal.Wire -- DBus.Introspection -- DBus.Introspection.Parse -- DBus.Introspection.Render -- DBus.Introspection.Types -- DBus.Socket -- DBus.TH -- DBus.Transport -- hs-source-dirs: lib -- ghc-options: -W -Wall -- build-depends: -- base ==4.*, -- bytestring <0.11, -- cereal <0.6, -- conduit >=1.3.0 && <1.4, -- containers <0.7, -- deepseq <1.5, -- exceptions <0.11, -- filepath <1.5, -- lens <4.20, -- network >=3.0.1.0 && <3.2, -- parsec <3.2, -- random <1.2, -- split <0.3, -- template-haskell <2.16.0.0, -- text <1.3, -- th-lift <0.9, -- transformers <0.6, -- unix <2.8, -- vector <0.13, -- xml-conduit >=1.9.0.0 && <1.10.0.0, -- xml-types <0.4 -+ ghc-options: -W -Wall -+ hs-source-dirs: lib -+ -+ build-depends: -+ base >=4 && <5 -+ , bytestring -+ , cereal -+ , conduit >= 1.3.0 -+ , containers -+ , deepseq -+ , exceptions -+ , filepath -+ , lens < 4.20 -+ , network >= 3.0.1.0 && < 3.2 -+ , parsec -+ , random -+ , split -+ , template-haskell < 2.17.0.0 -+ , text -+ , th-lift < 0.9 -+ , transformers -+ , unix -+ , vector -+ , xml-conduit >= 1.9.0.0 && < 1.10.0.0 -+ , xml-types -+ -+ exposed-modules: -+ DBus -+ DBus.Client -+ DBus.Generation -+ DBus.Internal.Address -+ DBus.Internal.Message -+ DBus.Internal.Types -+ DBus.Internal.Wire -+ DBus.Introspection -+ DBus.Introspection.Parse -+ DBus.Introspection.Render -+ DBus.Introspection.Types -+ DBus.Socket -+ DBus.TH -+ DBus.Transport - - test-suite dbus_tests -- type: exitcode-stdio-1.0 -- main-is: DBusTests.hs -- hs-source-dirs: tests -- other-modules: -- DBusTests.Address -- DBusTests.BusName -- DBusTests.Client -- DBusTests.ErrorName -- DBusTests.Generation -- DBusTests.Integration -- DBusTests.InterfaceName -- DBusTests.Introspection -- DBusTests.MemberName -- DBusTests.Message -- DBusTests.ObjectPath -- DBusTests.Serialization -- DBusTests.Signature -- DBusTests.Socket -- DBusTests.TH -- DBusTests.Transport -- DBusTests.Util -- DBusTests.Variant -- DBusTests.Wire -- ghc-options: -W -Wall -fno-warn-orphans -- build-depends: -- dbus -any, -- base ==4.*, -- bytestring <0.11, -- cereal <0.6, -- containers <0.7, -- directory <1.4, -- extra <1.8, -- filepath <1.5, -- network >=3.0.1.0 && <3.2, -- parsec <3.2, -- process <1.7, -- QuickCheck <2.15, -- random <1.2, -- resourcet <1.3, -- tasty <1.3, -- tasty-hunit <0.11, -- tasty-quickcheck <0.11, -- text <1.3, -- transformers <0.6, -- unix <2.8, -- vector <0.13 -+ type: exitcode-stdio-1.0 -+ main-is: DBusTests.hs -+ hs-source-dirs: tests -+ ghc-options: -W -Wall -fno-warn-orphans -+ -+ build-depends: -+ dbus -+ , base >=4 && <5 -+ , bytestring -+ , cereal -+ , containers -+ , directory -+ , extra < 1.8 -+ , filepath -+ , network >= 3.0.1.0 && < 3.2 -+ , parsec -+ , process -+ , QuickCheck < 2.15 -+ , random -+ , resourcet -+ , tasty -+ , tasty-hunit -+ , tasty-quickcheck -+ , text -+ , transformers -+ , unix -+ , vector -+ -+ other-modules: -+ DBusTests.Address -+ DBusTests.BusName -+ DBusTests.Client -+ DBusTests.ErrorName -+ DBusTests.Generation -+ DBusTests.Integration -+ DBusTests.InterfaceName -+ DBusTests.Introspection -+ DBusTests.MemberName -+ DBusTests.Message -+ DBusTests.ObjectPath -+ DBusTests.Serialization -+ DBusTests.Signature -+ DBusTests.Socket -+ DBusTests.TH -+ DBusTests.Transport -+ DBusTests.Util -+ DBusTests.Variant -+ DBusTests.Wire - - benchmark dbus_benchmarks -- type: exitcode-stdio-1.0 -- main-is: DBusBenchmarks.hs -- hs-source-dirs: benchmarks -- ghc-options: -Wall -fno-warn-orphans -- build-depends: -- dbus -any, -- base ==4.*, -- criterion <1.6 -+ type: exitcode-stdio-1.0 -+ main-is: DBusBenchmarks.hs -+ hs-source-dirs: benchmarks -+ ghc-options: -Wall -fno-warn-orphans -+ -+ build-depends: -+ dbus -+ , base >=4 && <5 -+ , criterion -Only in dbus-1.2.13-new: .git -Only in dbus-1.2.13-new: .gitignore -diff -ur dbus-1.2.13-old/lib/DBus/Generation.hs dbus-1.2.13-new/lib/DBus/Generation.hs ---- dbus-1.2.13-old/lib/DBus/Generation.hs 2019-02-14 16:37:47.000000000 +0100 -+++ dbus-1.2.13-new/lib/DBus/Generation.hs 2020-04-25 19:26:36.144991997 +0200 -@@ -1,3 +1,4 @@ -+{-# LANGUAGE CPP #-} - {-# LANGUAGE OverloadedStrings #-} - {-# LANGUAGE TemplateHaskell #-} - module DBus.Generation where -@@ -26,6 +27,13 @@ - import Prelude hiding (mapM) - import System.Posix.Types (Fd(..)) - -+-- | Compatibility helper to create (total) tuple expressions -+mkTupE :: [Exp] -> Exp -+mkTupE = TupE -+#if MIN_VERSION_template_haskell(2,16,0) -+ . map Just -+#endif -+ - type ClientBusPathR a = ReaderT (Client, T.BusName, T.ObjectPath) IO a - - dbusInvoke :: (Client -> T.BusName -> T.ObjectPath -> a) -> ClientBusPathR a -@@ -232,8 +240,8 @@ - finalOutputNames <- buildOutputNames - let variantListExp = map makeToVariantApp methodArgNames - mapOrHead' = mapOrHead outputLength -- fromVariantExp = mapOrHead' makeFromVariantApp fromVariantOutputNames TupE -- finalResultTuple = mapOrHead' VarE finalOutputNames TupE -+ fromVariantExp = mapOrHead' makeFromVariantApp fromVariantOutputNames mkTupE -+ finalResultTuple = mapOrHead' VarE finalOutputNames mkTupE - maybeExtractionPattern = mapOrHead' makeJustPattern finalOutputNames TupP - getMethodCallDefDec = [d| - $( varP methodCallDefN ) = -@@ -432,7 +440,7 @@ - } - |] - let mapOrHead' = mapOrHead argCount -- fromVariantExp = mapOrHead' makeFromVariantApp fromVariantOutputNames TupE -+ fromVariantExp = mapOrHead' makeFromVariantApp fromVariantOutputNames mkTupE - maybeExtractionPattern = mapOrHead' makeJustPattern toHandlerOutputNames TupP - applyToName toApply n = AppE toApply $ VarE n - finalApplication = foldl applyToName (VarE handlerArgN) diff --git a/pkgs/development/haskell-modules/patches/ghc-paths-nix-ghcjs.patch b/pkgs/development/haskell-modules/patches/ghc-paths-nix-ghcjs.patch deleted file mode 100644 index 48cf6a035afb..000000000000 --- a/pkgs/development/haskell-modules/patches/ghc-paths-nix-ghcjs.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff --git a/GHC/Paths.hs b/GHC/Paths.hs -index c87565d..88b3db4 100644 ---- a/GHC/Paths.hs -+++ b/GHC/Paths.hs -@@ -1,13 +1,35 @@ - {-# LANGUAGE CPP #-} -+{-# LANGUAGE ScopedTypeVariables #-} - - module GHC.Paths ( - ghc, ghc_pkg, libdir, docdir - ) where - -+import Control.Exception as E -+import Data.Maybe -+import System.Environment -+import System.IO.Unsafe -+ -+-- Yes, there's lookupEnv now, but we want to be compatible -+-- with older GHCs. -+checkEnv :: String -> IO (Maybe String) -+checkEnv var = E.catch (fmap Just (getEnv var)) -+ (\ (e :: IOException) -> return Nothing) -+ -+nixLibdir, nixDocdir, nixGhc, nixGhcPkg :: Maybe FilePath -+nixLibdir = unsafePerformIO (checkEnv "NIX_GHCJS_LIBDIR") -+nixDocdir = unsafePerformIO (checkEnv "NIX_GHCJS_DOCDIR") -+nixGhc = unsafePerformIO (checkEnv "NIX_GHCJS") -+nixGhcPkg = unsafePerformIO (checkEnv "NIX_GHCJSPKG") -+{-# NOINLINE nixLibdir #-} -+{-# NOINLINE nixDocdir #-} -+{-# NOINLINE nixGhc #-} -+{-# NOINLINE nixGhcPkg #-} -+ - libdir, docdir, ghc, ghc_pkg :: FilePath - --libdir = GHC_PATHS_LIBDIR --docdir = GHC_PATHS_DOCDIR -+libdir = fromMaybe GHC_PATHS_LIBDIR nixLibdir -+docdir = fromMaybe GHC_PATHS_DOCDIR nixDocdir - --ghc = GHC_PATHS_GHC --ghc_pkg = GHC_PATHS_GHC_PKG -+ghc = fromMaybe GHC_PATHS_GHC nixGhc -+ghc_pkg = fromMaybe GHC_PATHS_GHC_PKG nixGhcPkg -diff --git a/Setup.hs b/Setup.hs -index f2d1733..ca4792e 100644 ---- a/Setup.hs -+++ b/Setup.hs -@@ -39,13 +39,13 @@ main = defaultMainWithHooks simpleUserHooks { - #else - libdir_ <- rawSystemProgramStdoutConf (fromFlag (configVerbosity flags)) - #endif -- ghcProgram (withPrograms lbi) ["--print-libdir"] -+ ghcjsProgram (withPrograms lbi) ["--print-libdir"] - let libdir = reverse $ dropWhile isSpace $ reverse libdir_ - -- ghc_pkg = case lookupProgram ghcPkgProgram (withPrograms lbi) of -+ ghc_pkg = case lookupProgram ghcjsPkgProgram (withPrograms lbi) of - Just p -> programPath p - Nothing -> error "ghc-pkg was not found" -- ghc = case lookupProgram ghcProgram (withPrograms lbi) of -+ ghc = case lookupProgram ghcjsProgram (withPrograms lbi) of - Just p -> programPath p - Nothing -> error "ghc was not found" - diff --git a/pkgs/development/haskell-modules/patches/hunspell.patch b/pkgs/development/haskell-modules/patches/hunspell.patch deleted file mode 100644 index cc115029a7ad..000000000000 --- a/pkgs/development/haskell-modules/patches/hunspell.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -Naur hunspell-hs-0.1.0.0.orig/hunspell-hs.cabal hunspell-hs-0.1.0.0/hunspell-hs.cabal ---- hunspell-hs-0.1.0.0.orig/hunspell-hs.cabal 2018-08-26 20:23:33.053763300 +0200 -+++ hunspell-hs-0.1.0.0/hunspell-hs.cabal 2018-08-26 20:42:05.886074510 +0200 -@@ -37,7 +37,7 @@ - base >=4.7 && <5 - , stm - if os(linux) -- extra-libraries: -+ pkgconfig-depends: - hunspell - if os(darwin) - include-dirs: -@@ -63,7 +63,7 @@ - , hunspell-hs - , stm - if os(linux) -- extra-libraries: -+ pkgconfig-depends: - hunspell - if os(darwin) - include-dirs: -@@ -88,7 +88,7 @@ - , hunspell-hs - , stm - if os(linux) -- extra-libraries: -+ pkgconfig-depends: - hunspell - if os(darwin) - include-dirs: -- cgit 1.4.1