uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,12 @@
diff --git a/GLUT.cabal b/GLUT.cabal
index f370d6c..a404e1e 100644
--- a/GLUT.cabal
+++ b/GLUT.cabal
@@ -103,6 +103,7 @@ library
else
cpp-options: "-DCALLCONV=ccall"
cc-options: "-DUSE_DLSYM"
+ pkgconfig-depends: glut
executable BOGLGP01-OnYourOwn1
if !flag(BuildExamples)

View file

@ -0,0 +1,9 @@
--- SDL-image-0.6.2.0/Graphics/UI/SDL/Image/Version.hsc.orig 2021-08-06 01:21:05.000000000 +0200
+++ SDL-image-0.6.2.0/Graphics/UI/SDL/Image/Version.hsc 2021-08-06 01:21:56.000000000 +0200
@@ -1,4 +1,6 @@
#include "SDL_image.h"
+-- override SDL_main.h redefining main to SDL_main on darwin
+#define main main
module Graphics.UI.SDL.Image.Version
( compiledFor
, linkedWith

View file

@ -0,0 +1,9 @@
--- SDL-ttf-0.6.3.0/Graphics/UI/SDL/TTF/Version.hsc.orig 2021-08-06 01:31:39.000000000 +0200
+++ SDL-ttf-0.6.3.0/Graphics/UI/SDL/TTF/Version.hsc 2021-08-06 01:32:03.000000000 +0200
@@ -1,4 +1,6 @@
#include "SDL_ttf.h"
+-- override SDL_main.h redefining main to SDL_main on darwin
+#define main main
module Graphics.UI.SDL.TTF.Version
( compiledFor
, linkedWith

View file

@ -0,0 +1,24 @@
From 657b70d174fe5cb61e56cb8b9c5e57f1ec216f2b Mon Sep 17 00:00:00 2001
From: Mikhail Glushenkov <mikhail.glushenkov@gmail.com>
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

View file

@ -0,0 +1,26 @@
From 657b70d174fe5cb61e56cb8b9c5e57f1ec216f2b Mon Sep 17 00:00:00 2001
From: Mikhail Glushenkov <mikhail.glushenkov@gmail.com>
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

View file

@ -0,0 +1,28 @@
From 35d972b3dc5056110d55315f2256d9c5046299c7 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Tue, 1 Sep 2015 17:58:36 +0200
Subject: [PATCH] Revert "Fix maximum sizing calculation."
This reverts commit 44b01ba38b4fcdb5a85f44fa2f3af1f29cde8f40. The change breaks
this package on 32 bit platforms. See https://github.com/bos/bloomfilter/issues/7
for further details.
---
Data/BloomFilter/Easy.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Data/BloomFilter/Easy.hs b/Data/BloomFilter/Easy.hs
index 5143c6e..a349168 100644
--- a/Data/BloomFilter/Easy.hs
+++ b/Data/BloomFilter/Easy.hs
@@ -72,7 +72,7 @@ safeSuggestSizing capacity errRate
minimum [((-k) * cap / log (1 - (errRate ** (1 / k))), k)
| k <- [1..100]]
roundedBits = nextPowerOfTwo (ceiling bits)
- in if roundedBits <= 0 || roundedBits > 0xffffffff
+ in if roundedBits <= 0
then Left "capacity too large to represent"
else Right (roundedBits, truncate hashes)
--
2.5.1

View file

@ -0,0 +1,69 @@
diff --git a/Crypto/KDF/Argon2.hs b/Crypto/KDF/Argon2.hs
index 044ba00..31dc6f1 100644
--- a/Crypto/KDF/Argon2.hs
+++ b/Crypto/KDF/Argon2.hs
@@ -12,6 +12,7 @@
-- File started from Argon2.hs, from Oliver Charles
-- at https://github.com/ocharles/argon2
--
+{-# LANGUAGE DataKinds #-}
module Crypto.KDF.Argon2
(
Options(..)
@@ -32,6 +33,7 @@ import Control.Monad (when)
import Data.Word
import Foreign.C
import Foreign.Ptr
+import Data.Proxy
-- | Which variant of Argon2 to use. You should choose the variant that is most
-- applicable to your intention to hash inputs.
@@ -100,33 +102,12 @@ defaultOptions =
}
hash :: (ByteArrayAccess password, ByteArrayAccess salt, ByteArray out)
- => Options
+ => [Proxy "cryptonite:Crypto.KDF.Argon2.hash is known to be broken on this architecture. See https://github.com/haskell-crypto/cryptonite/issues/360"]
-> password
-> salt
-> Int
-> CryptoFailable out
-hash options password salt outLen
- | saltLen < saltMinLength = CryptoFailed CryptoError_SaltTooSmall
- | outLen < outputMinLength = CryptoFailed CryptoError_OutputLengthTooSmall
- | outLen > outputMaxLength = CryptoFailed CryptoError_OutputLengthTooBig
- | otherwise = CryptoPassed $ B.allocAndFreeze outLen $ \out -> do
- res <- B.withByteArray password $ \pPass ->
- B.withByteArray salt $ \pSalt ->
- argon2_hash (iterations options)
- (memory options)
- (parallelism options)
- pPass
- (csizeOfInt passwordLen)
- pSalt
- (csizeOfInt saltLen)
- out
- (csizeOfInt outLen)
- (cOfVariant $ variant options)
- (cOfVersion $ version options)
- when (res /= 0) $ error "argon2: hash: internal error"
- where
- saltLen = B.length salt
- passwordLen = B.length password
+hash options password salt outLen = error "cryptonite:Crypto.KDF.Argon2.hash is known to be broken on this architecture. See https://github.com/haskell-crypto/cryptonite/issues/360"
data Pass
data Salt
diff --git a/tests/KAT_Argon2.hs b/tests/KAT_Argon2.hs
index a347fc5..fdba079 100644
--- a/tests/KAT_Argon2.hs
+++ b/tests/KAT_Argon2.hs
@@ -32,7 +32,7 @@ kdfTests = zipWith toKDFTest is vectors
where
toKDFTest i v =
testCase (show i)
- (CryptoPassed (kdfResult v) @=? Argon2.hash (kdfOptions v) (kdfPass v) (kdfSalt v) (B.length $ kdfResult v))
+ (pure ())
is :: [Int]
is = [1..]

View file

@ -0,0 +1,333 @@
From 2490fa65eeba52699a7c0e303aa5cb9b78c2b1cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= <mail@nh2.me>
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 <droundy@darcs.net>, <darcs-devel@darcs.net>
@@ -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

View file

@ -0,0 +1,120 @@
--- 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

View file

@ -0,0 +1,67 @@
From 67bb87ceff53f0178c988dd4e15eeb2daee92b84 Mon Sep 17 00:00:00 2001
From: Gregor Kleen <pngwjpgh@users.noreply.github.com>
Date: Tue, 20 Feb 2018 17:46:24 +0100
Subject: [PATCH] Relax upper version bounds on dependencies
---
Setup.hs | 20 ++++++++++++++++----
encoding.cabal | 4 ++--
stack.yaml | 4 ++--
3 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/Setup.hs b/Setup.hs
index de719e6..fe5b84c 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,13 +1,25 @@
+{-# LANGUAGE CPP #-}
+
module Main where
import Distribution.Simple
import Data.Encoding.Preprocessor.Mapping
import Data.Encoding.Preprocessor.XMLMappingBuilder
+#if MIN_VERSION_Cabal(2,0,0)
+main = defaultMainWithHooks (simpleUserHooks
+ {hookedPreProcessors = ( ("mapping" , \_ _ _ -> mappingPreprocessor)
+ : ("mapping2", \_ _ _ -> mappingPreprocessor)
+ : ("xml" , \_ _ _ -> xmlPreprocessor)
+ : (hookedPreProcessors simpleUserHooks)
+ )
+ })
+#else
main = defaultMainWithHooks (simpleUserHooks
- {hookedPreProcessors = (("mapping",\_ _ -> mappingPreprocessor)
- :("mapping2",\_ _ -> mappingPreprocessor)
- :("xml",\_ _ -> xmlPreprocessor)
- :(hookedPreProcessors simpleUserHooks)
+ {hookedPreProcessors = ( ("mapping" , \_ _ -> mappingPreprocessor)
+ : ("mapping2", \_ _ -> mappingPreprocessor)
+ : ("xml" , \_ _ -> xmlPreprocessor)
+ : (hookedPreProcessors simpleUserHooks)
)
})
+#endif
diff --git a/encoding.cabal b/encoding.cabal
index ec20617..f221715 100644
--- a/encoding.cabal
+++ b/encoding.cabal
@@ -36,7 +36,7 @@ Source-Repository this
Custom-Setup
Setup-Depends: base >=3 && <5,
- Cabal >=1.24 && <1.25,
+ Cabal >=1.24 && <2.1,
containers,
filepath,
ghc-prim,
@@ -51,7 +51,7 @@ Library
extensible-exceptions >=0.1 && <0.2,
ghc-prim >=0.3 && <0.6,
mtl >=2.0 && <2.3,
- regex-compat >=0.71 && <0.95
+ regex-compat >=0.71 && <0.96
Extensions: CPP

View file

@ -0,0 +1,383 @@
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 <blaze@ruddy.ru>
author: John Millikin <john@john-millikin.com>
+maintainer: Andrey Sverdlichenko <blaze@ruddy.ru>
+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.
- .
- @
- &#x7b;-\# LANGUAGE OverloadedStrings \#-&#x7d;
- .
- import Data.List (sort)
- import DBus
- import DBus.Client
- .
- main = do
- &#x20; client <- connectSession
- &#x20; //
- &#x20; \-- Request a list of connected clients from the bus
- &#x20; reply <- call_ client (methodCall \"\/org\/freedesktop\/DBus\" \"org.freedesktop.DBus\" \"ListNames\")
- &#x20; &#x7b; methodCallDestination = Just \"org.freedesktop.DBus\"
- &#x20; &#x7d;
- &#x20; //
- &#x20; \-- org.freedesktop.DBus.ListNames() returns a single value, which is
- &#x20; \-- a list of names (here represented as [String])
- &#x20; let Just names = fromVariant (methodReturnBody reply !! 0)
- &#x20; //
- &#x20; \-- Print each name on a line, sorted so reserved names are below
- &#x20; \-- temporary names.
- &#x20; 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.
+ .
+ @
+ &#x7b;-\# LANGUAGE OverloadedStrings \#-&#x7d;
+ .
+ import Data.List (sort)
+ import DBus
+ import DBus.Client
+ .
+ main = do
+ &#x20; client <- connectSession
+ &#x20;
+ &#x20; -- Request a list of connected clients from the bus
+ &#x20; reply <- call_ client (methodCall \"\/org\/freedesktop\/DBus\" \"org.freedesktop.DBus\" \"ListNames\")
+ &#x20; &#x7b; methodCallDestination = Just \"org.freedesktop.DBus\"
+ &#x20; &#x7d;
+ &#x20;
+ &#x20; -- org.freedesktop.DBus.ListNames() returns a single value, which is
+ &#x20; -- a list of names (here represented as [String])
+ &#x20; let Just names = fromVariant (methodReturnBody reply !! 0)
+ &#x20;
+ &#x20; -- Print each name on a line, sorted so reserved names are below
+ &#x20; -- temporary names.
+ &#x20; 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)

View file

@ -0,0 +1,65 @@
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"

View file

@ -0,0 +1,43 @@
diff -Naur ghc-paths-0.1.0.9/GHC/Paths.hs ghc-paths-0.1.0.9-new/GHC/Paths.hs
--- ghc-paths-0.1.0.9/GHC/Paths.hs 2012-12-16 13:53:45.720148396 +0100
+++ ghc-paths-0.1.0.9-new/GHC/Paths.hs 2012-12-16 17:22:12.765576568 +0100
@@ -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_GHC_LIBDIR")
+nixDocdir = unsafePerformIO (checkEnv "NIX_GHC_DOCDIR")
+nixGhc = unsafePerformIO (checkEnv "NIX_GHC")
+nixGhcPkg = unsafePerformIO (checkEnv "NIX_GHCPKG")
+{-# 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

View file

@ -0,0 +1,26 @@
diff --git a/gogol-core.cabal b/gogol-core.cabal
index 4c47988..caa4796 100644
--- a/gogol-core.cabal
+++ b/gogol-core.cabal
@@ -62,7 +62,7 @@ library
, lens >= 4.4
, resourcet >= 1.1
, scientific >= 0.3
- , servant >= 0.4.4
+ , servant >= 0.14.1
, text >= 1.1
, unordered-containers >= 0.2.5
diff --git a/src/Network/Google/Prelude.hs b/src/Network/Google/Prelude.hs
index a4ad9de..795c690 100644
--- a/src/Network/Google/Prelude.hs
+++ b/src/Network/Google/Prelude.hs
@@ -28,7 +28,7 @@ import Network.HTTP.Client as Export (RequestBody)
import Numeric.Natural as Export (Natural)
import Prelude as Export hiding (product, span, any, Word)
import Servant.API as Export hiding (Headers, Link, getResponse, Stream, ResponseHeader, Header, header)
-import Servant.Utils.Links as Export hiding (Link)
+import Servant.Links as Export hiding (Link)
import Web.HttpApiData as Export (FromHttpApiData (..), ToHttpApiData (..))
import Network.Google.Data.Bytes as Export

View file

@ -0,0 +1,40 @@
diff --git a/Data/GraphViz/Commands.hs b/Data/GraphViz/Commands.hs
index 20e7dbe..514c29d 100644
--- a/Data/GraphViz/Commands.hs
+++ b/Data/GraphViz/Commands.hs
@@ -63,14 +63,14 @@ import System.IO (Handle, hPutStrLn, hSetBinaryMode, stderr)
-- -----------------------------------------------------------------------------
showCmd :: GraphvizCommand -> String
-showCmd Dot = "dot"
-showCmd Neato = "neato"
-showCmd TwoPi = "twopi"
-showCmd Circo = "circo"
-showCmd Fdp = "fdp"
-showCmd Sfdp = "sfdp"
-showCmd Osage = "osage"
-showCmd Patchwork = "patchwork"
+showCmd Dot = "@graphviz@/bin/dot"
+showCmd Neato = "@graphviz@/bin/neato"
+showCmd TwoPi = "@graphviz@/bin/twopi"
+showCmd Circo = "@graphviz@/bin/circo"
+showCmd Fdp = "@graphviz@/bin/fdp"
+showCmd Sfdp = "@graphviz@/bin/sfdp"
+showCmd Osage = "@graphviz@/bin/osage"
+showCmd Patchwork = "@graphviz@/bin/patchwork"
-- | The default command for directed graphs.
dirCommand :: GraphvizCommand
@@ -312,8 +312,11 @@ runGraphvizCanvas' d = runGraphvizCanvas (commandFor d) d
-- | Is the Graphviz suite of tools installed? This is determined by
-- whether @dot@ is available in the @PATH@.
+--
+-- Note: With nixpkgs, this will always return 'True' as graphviz'
+-- store paths are hardcoded instead of looking at @PATH@.
isGraphvizInstalled :: IO Bool
-isGraphvizInstalled = liftM isJust . findExecutable $ showCmd Dot
+isGraphvizInstalled = pure True -- :)
-- | If Graphviz does not seem to be available, print the provided
-- error message and then exit fatally.

View file

@ -0,0 +1,30 @@
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:

View file

@ -0,0 +1,95 @@
diff --git a/lambdabot-core.cabal b/lambdabot-core.cabal
index 861a28b..87175a3 100644
--- a/lambdabot-core.cabal
+++ b/lambdabot-core.cabal
@@ -19,7 +19,7 @@ homepage: https://wiki.haskell.org/Lambdabot
build-type: Simple
cabal-version: >= 1.10
-tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.4
+tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.4, GHC == 9.0.2
extra-source-files: AUTHORS.md
COMMENTARY.md
@@ -89,9 +89,8 @@ library
network-bsd >= 2.7 && < 2.9,
parsec >= 3,
prim-uniq >= 0.2 && < 0.4,
- random >= 1,
- random-fu >= 0.2.6.2,
- random-source >= 0.3,
+ random >= 1.2,
+ random-fu >= 0.3.0.0,
regex-tdfa >= 1.1 && < 1.4,
SafeSemaphore >= 0.9,
split >= 0.2,
diff --git a/src/Lambdabot/Bot.hs b/src/Lambdabot/Bot.hs
index 1b0de2e..833fb4c 100644
--- a/src/Lambdabot/Bot.hs
+++ b/src/Lambdabot/Bot.hs
@@ -1,6 +1,5 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE TemplateHaskell #-}
-- | The guts of lambdabot.
--
-- The LB/Lambdabot monad
@@ -37,7 +36,6 @@ import Control.Monad.Error
import Control.Monad.Reader
import Control.Monad.State
import qualified Data.Map as M
-import Data.Random.Source
import qualified Data.Set as S
------------------------------------------------------------------------
@@ -136,17 +134,3 @@ ircPrivmsg who msg = do
ircPrivmsg' :: Nick -> String -> LB ()
ircPrivmsg' who "" = ircPrivmsg' who " "
ircPrivmsg' who msg = send $ privmsg who msg
-
-------------------------------------------------------------------------
-
-monadRandom [d|
-
- instance MonadRandom LB where
- getRandomWord8 = liftIO getRandomWord8
- getRandomWord16 = liftIO getRandomWord16
- getRandomWord32 = liftIO getRandomWord32
- getRandomWord64 = liftIO getRandomWord64
- getRandomDouble = liftIO getRandomDouble
- getRandomNByteInteger n = liftIO (getRandomNByteInteger n)
-
- |]
diff --git a/src/Lambdabot/Util.hs b/src/Lambdabot/Util.hs
index effdf71..259699b 100644
--- a/src/Lambdabot/Util.hs
+++ b/src/Lambdabot/Util.hs
@@ -23,14 +23,15 @@ module Lambdabot.Util (
randomSuccessMsg
) where
+import Control.Concurrent.Lifted
import Control.Monad.Trans
+import Control.Monad.Trans.Control
import Data.Char
import Data.List
import Data.Random
-import Control.Concurrent.Lifted
-import Control.Monad.Trans.Control
import Lambdabot.Config
import Lambdabot.Config.Core
+import System.Random.Stateful (newIOGenM, newStdGen)
------------------------------------------------------------------------
@@ -63,7 +64,9 @@ listToStr conj (item:items) =
-- | Pick a random element of the list.
random :: MonadIO m => [a] -> m a
-random = io . sample . randomElement
+random l = do
+ g <- newIOGenM =<< newStdGen
+ sampleFrom g (randomElement l)
------------------------------------------------------------------------

View file

@ -0,0 +1,58 @@
diff --git a/lambdabot-novelty-plugins.cabal b/lambdabot-novelty-plugins.cabal
index 69c8447..50a35f6 100644
--- a/lambdabot-novelty-plugins.cabal
+++ b/lambdabot-novelty-plugins.cabal
@@ -36,7 +36,7 @@ homepage: https://wiki.haskell.org/Lambdabot
build-type: Simple
cabal-version: >= 1.10
-tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.4
+tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.4, GHC == 9.0.2
source-repository head
type: git
@@ -71,7 +71,8 @@ library
lambdabot-core >= 5.3 && < 5.4,
misfortune >= 0.1,
process >= 1.1,
- random-fu >= 0.2.6.2,
+ random >= 1.2,
+ random-fu >= 0.3.0.0,
regex-tdfa >= 1.1,
-- runtime dependencies
diff --git a/src/Lambdabot/Plugin/Novelty/Numberwang.hs b/src/Lambdabot/Plugin/Novelty/Numberwang.hs
index ae41eb4..8321a14 100644
--- a/src/Lambdabot/Plugin/Novelty/Numberwang.hs
+++ b/src/Lambdabot/Plugin/Novelty/Numberwang.hs
@@ -7,7 +7,9 @@ import Control.Monad
import Data.Random
import Data.Random.Distribution.Poisson
import Lambdabot.Plugin
+import Lambdabot.Util
import Numeric
+import System.Random.Stateful (newIOGenM, newStdGen)
data NumberwangState = State
@@ -23,7 +25,9 @@ conDist = poisson (32 :: Double)
numberwangPlugin :: Module NumberwangState
numberwangPlugin = newModule
- { moduleDefState = sample (State <$> cmdDist <*> conDist)
+ { moduleDefState = do
+ g <- newIOGenM =<< newStdGen
+ sampleFrom g (State <$> cmdDist <*> conDist)
, moduleCmds = return
[ (command "numberwang")
{ help = say "@numberwang <number>: Determines if it is Numberwang."
@@ -61,7 +65,8 @@ checkNumberwang :: (MonadLBState m, LBState m ~ NumberwangState) =>
checkNumberwang cmd l = withState cmd $ \ n setN nDist -> do
if n <= l
then do
- setN =<< lb (sample nDist)
+ g <- newIOGenM =<< newStdGen
+ setN =<< sampleFrom g nDist
return True
else do
setN (n - l)

View file

@ -0,0 +1,70 @@
diff --git a/misfortune.cabal b/misfortune.cabal
index f5d0dd3..faa5794 100644
--- a/misfortune.cabal
+++ b/misfortune.cabal
@@ -113,7 +113,8 @@ Library
directory,
filepath,
knob,
- random-fu >= 0.2.2,
+ random,
+ random-fu >= 0.3,
semigroups,
text,
utf8-string,
diff --git a/src/Data/Fortune.hs b/src/Data/Fortune.hs
index 16d221e..ffbc970 100644
--- a/src/Data/Fortune.hs
+++ b/src/Data/Fortune.hs
@@ -64,6 +64,7 @@ import Paths_misfortune
import System.Directory
import System.Environment
import System.FilePath
+import System.Random.Stateful (newIOGenM, newStdGen)
-- |The number of fortune strings in the index
numFortunes :: S.FortuneStats -> Int
@@ -233,9 +234,10 @@ randomFortune paths = withFortuneFiles '%' False paths $ \fs -> do
-- random fortune from that file (unformly).
randomFortuneFromRandomFile :: RVar FortuneFile -> IO String
randomFortuneFromRandomFile file = do
- f <- sample file
+ gen <- newStdGen >>= newIOGenM
+ f <- sampleFrom gen file
n <- getNumFortunes f
- i <- sample (uniform 0 (n-1))
+ i <- sampleFrom gen (uniform 0 (n-1))
T.unpack <$> getFortune f i
-- |Given a list of 'FortuneFile's, compute a distrubution over them weighted by the number
diff --git a/src/Fortune.hs b/src/Fortune.hs
index 5a27578..d6ffb74 100644
--- a/src/Fortune.hs
+++ b/src/Fortune.hs
@@ -21,6 +21,7 @@ import System.Environment
import System.Exit
import System.FilePath
import System.IO
+import System.Random.Stateful (newIOGenM, newStdGen)
import Text.Printf
import Text.Regex.Base
import Text.Regex.PCRE
@@ -200,6 +201,7 @@ main = do
fortunes <- filterM (filterFile args) (fortuneFiles args)
dist <- getDist args fortunes
+ gen <- newStdGen >>= newIOGenM
when (numEvents dist == 0) $ do
hPutStrLn stderr "No fortunes matched the filter criteria"
@@ -225,8 +227,8 @@ main = do
, let pctStr = printf "(%.2f%%)" (100 * weight / totalWeight dist) :: String
]
else do
- (file, fortuneDist) <- sample dist
- fortune <- sample fortuneDist
+ (file, fortuneDist) <- sampleFrom gen dist
+ fortune <- sampleFrom gen fortuneDist
putStrLn . T.unpack =<< getFortune file fortune
getDist :: Args -> [FortuneFile] -> IO (Categorical Float (FortuneFile, Categorical Float Int))

View file

@ -0,0 +1,11 @@
diff -ur opencv-0.0.2.1.bak/Setup.hs opencv-0.0.2.1/Setup.hs
--- opencv-0.0.2.1.bak/Setup.hs 2018-11-10 17:18:41.355731189 +0100
+++ opencv-0.0.2.1/Setup.hs 2018-11-10 17:18:56.901681162 +0100
@@ -3,6 +3,6 @@
main = do
args <- getArgs
- let args' | "configure" `elem` args = args ++ ["--with-gcc","c++", "--with-ld","c++"]
+ let args' | "configure" `elem` args = args ++ ["--with-gcc","c++"]
| otherwise = args
defaultMainArgs args'

View file

@ -0,0 +1,8 @@
--- a/Setup.hs 2021-02-04 14:01:09.557970245 +0100
+++ b/Setup.hs 2021-02-04 14:07:45.047443753 +0100
@@ -3,4 +3,4 @@
import Distribution.Simple
main :: IO ()
-main = defaultMainWithHooks defaultUserHooks
+main = defaultMainWithHooks autoconfUserHooks

View file

@ -0,0 +1,24 @@
diff --git a/recursion-schemes.cabal b/recursion-schemes.cabal
index c35f2c6..e692ade 100644
--- a/recursion-schemes.cabal
+++ b/recursion-schemes.cabal
@@ -93,6 +93,7 @@ library
Paths_recursion_schemes
ghc-options: -Wall
+ ghc-prof-options: -DPROFILING_ENABLED
if impl(ghc >= 8.6)
ghc-options: -Wno-star-is-type
default-language: Haskell2010
diff --git a/src/Data/Functor/Foldable/TH.hs b/src/Data/Functor/Foldable/TH.hs
index b3d5ac8..d4ef0e4 100644
--- a/src/Data/Functor/Foldable/TH.hs
+++ b/src/Data/Functor/Foldable/TH.hs
@@ -1,4 +1,7 @@
{-# LANGUAGE CPP, PatternGuards, Rank2Types #-}
+#if defined(PROFILING_ENABLED)
+{-# OPTIONS_GHC -O0 #-}
+#endif
module Data.Functor.Foldable.TH
( MakeBaseFunctor(..)
, BaseRules

View file

@ -0,0 +1,19 @@
diff -rN -u old-regex-compat-tdfa/Text/Regex.hs new-regex-compat-tdfa/Text/Regex.hs
--- old-regex-compat-tdfa/Text/Regex.hs 2022-02-20 13:42:36.828752458 +0100
+++ new-regex-compat-tdfa/Text/Regex.hs 2022-02-20 13:42:36.828752458 +0100
@@ -139,7 +139,7 @@
splitRegex :: Regex -> String -> [String]
splitRegex _ [] = []
splitRegex delim strIn =
- let matches = map (!0) (matchAll delim strIn)
+ let matches = map (! 0) (matchAll delim strIn)
go _i str [] = str : []
go i str ((off,len):rest) =
let i' = off+len
@@ -194,4 +194,4 @@
then [firstline,""]
else firstline : loop remainder
--}
\ No newline at end of file
+-}

View file

@ -0,0 +1,75 @@
diff --git a/servant-client-core.cabal b/servant-client-core.cabal
index 5789da601..3faf65bb4 100644
--- a/servant-client-core.cabal
+++ b/servant-client-core.cabal
@@ -96,6 +96,7 @@ test-suite spec
main-is: Spec.hs
other-modules:
Servant.Client.Core.Internal.BaseUrlSpec
+ Servant.Client.Core.RequestSpec
-- Dependencies inherited from the library. No need to specify bounds.
build-depends:
diff --git a/src/Servant/Client/Core/Request.hs b/src/Servant/Client/Core/Request.hs
index 73756e702..0276d46f8 100644
--- a/src/Servant/Client/Core/Request.hs
+++ b/src/Servant/Client/Core/Request.hs
@@ -64,8 +64,32 @@ data RequestF body path = Request
, requestHeaders :: Seq.Seq Header
, requestHttpVersion :: HttpVersion
, requestMethod :: Method
- } deriving (Generic, Typeable, Eq, Show, Functor, Foldable, Traversable)
+ } deriving (Generic, Typeable, Eq, Functor, Foldable, Traversable)
+instance (Show a, Show b) =>
+ Show (Servant.Client.Core.Request.RequestF a b) where
+ showsPrec p req
+ = showParen
+ (p >= 11)
+ ( showString "Request {requestPath = "
+ . showsPrec 0 (requestPath req)
+ . showString ", requestQueryString = "
+ . showsPrec 0 (requestQueryString req)
+ . showString ", requestBody = "
+ . showsPrec 0 (requestBody req)
+ . showString ", requestAccept = "
+ . showsPrec 0 (requestAccept req)
+ . showString ", requestHeaders = "
+ . showsPrec 0 (redactSensitiveHeader <$> requestHeaders req))
+ . showString ", requestHttpVersion = "
+ . showsPrec 0 (requestHttpVersion req)
+ . showString ", requestMethod = "
+ . showsPrec 0 (requestMethod req)
+ . showString "}"
+ where
+ redactSensitiveHeader :: Header -> Header
+ redactSensitiveHeader ("Authorization", _) = ("Authorization", "<REDACTED>")
+ redactSensitiveHeader h = h
instance Bifunctor RequestF where bimap = bimapDefault
instance Bifoldable RequestF where bifoldMap = bifoldMapDefault
instance Bitraversable RequestF where
diff --git a/test/Servant/Client/Core/RequestSpec.hs b/test/Servant/Client/Core/RequestSpec.hs
new file mode 100644
index 000000000..99a1db7d3
--- /dev/null
+++ b/test/Servant/Client/Core/RequestSpec.hs
@@ -0,0 +1,19 @@
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+{-# LANGUAGE OverloadedStrings #-}
+module Servant.Client.Core.RequestSpec (spec) where
+
+
+import Prelude ()
+import Prelude.Compat
+import Control.Monad
+import Data.List (isInfixOf)
+import Servant.Client.Core.Request
+import Test.Hspec
+
+spec :: Spec
+spec = do
+ describe "Request" $ do
+ describe "show" $ do
+ it "redacts the authorization header" $ do
+ let request = void $ defaultRequest { requestHeaders = pure ("authorization", "secret") }
+ isInfixOf "secret" (show request) `shouldBe` False

View file

@ -0,0 +1,86 @@
diff -Naurw sexpr-0.2.1/Codec/Sexpr/Internal.hs sexpr-0.2.1-patched/Codec/Sexpr/Internal.hs
--- sexpr-0.2.1/Codec/Sexpr/Internal.hs 2009-04-30 00:51:06.000000000 +0200
+++ sexpr-0.2.1-patched/Codec/Sexpr/Internal.hs 2018-08-03 01:38:08.000000000 +0200
@@ -62,11 +62,6 @@
return $ List []]
arbSexpr n = oneof [Atom <$> arbitrary,
List <$> (resize (n `div` 2) arbitrary)]
- coarbitrary (Atom s) = variant 0 . coarbitrary s
- coarbitrary (HintedAtom h s) = variant 1 . coarbitrary_h . coarbitrary s
- where coarbitrary_h =
- foldr (\a b -> variant (ord a) . variant 1 . b) (variant 0) h
- coarbitrary (List ss) = variant 2 . coarbitrary ss
-- |@fold f s@ applies f to each sub-S-expression of s, from each leaf
-- to the root. @f@ need not preserve the shape of @s@, in contrast
diff -Naurw sexpr-0.2.1/Codec/Sexpr/Printer.hs sexpr-0.2.1-patched/Codec/Sexpr/Printer.hs
--- sexpr-0.2.1/Codec/Sexpr/Printer.hs 2009-04-30 00:51:06.000000000 +0200
+++ sexpr-0.2.1-patched/Codec/Sexpr/Printer.hs 2018-08-03 01:41:56.000000000 +0200
@@ -1,4 +1,4 @@
-{-# LANGUAGE FlexibleInstances, OverlappingInstances #-}
+{-# LANGUAGE FlexibleInstances #-}
-- | Export S-expressions in any of the three ordinary forms:
--
@@ -17,6 +17,8 @@
module Codec.Sexpr.Printer where
+import Prelude hiding ((<>))
+
import Codec.Sexpr.Internal
import Data.Binary.Put
@@ -30,7 +32,7 @@
instance Show (Sexpr String) where
show s = advancedString s
-instance Show s => Show (Sexpr s) where
+instance {-# OVERLAPPABLE #-} Show s => Show (Sexpr s) where
show s = advancedString $ fmap show s
raw :: String -> String -> String
diff -Naurw sexpr-0.2.1/Codec/Sexpr/Tests.hs sexpr-0.2.1-patched/Codec/Sexpr/Tests.hs
--- sexpr-0.2.1/Codec/Sexpr/Tests.hs 2009-04-30 00:51:06.000000000 +0200
+++ sexpr-0.2.1-patched/Codec/Sexpr/Tests.hs 2018-08-03 01:46:32.000000000 +0200
@@ -67,11 +67,9 @@
instance Arbitrary B.ByteString where
arbitrary = B.pack `fmap` arbitrary
- coarbitrary = undefined
instance Arbitrary Char where
arbitrary = choose (32,255) >>= \n -> return (chr n)
- coarbitrary n = variant (ord n)
main :: IO ()
diff -Naurw sexpr-0.2.1/sexpr.cabal sexpr-0.2.1-patched/sexpr.cabal
--- sexpr-0.2.1/sexpr.cabal 2018-08-03 01:36:11.000000000 +0200
+++ sexpr-0.2.1-patched/sexpr.cabal 2018-08-03 01:49:13.000000000 +0200
@@ -13,23 +13,9 @@
maintainer: bts@evenmere.org
build-type: Simple
-flag testing
- description: build test executable
- default: False
-
library
- if flag(testing)
- ghc-options: -Wall
- Build-Depends: base, base64-string, pretty, bytestring, binary
+ Build-Depends: base, base64-string, pretty, bytestring, binary, QuickCheck
Exposed-modules: Codec.Sexpr
-
-executable sexpr-test
- if !flag(testing)
- buildable: False
- ghc-options: -Wall
- main-is: Codec/Sexpr/Tests.hs
- other-modules: Codec.Sexpr
- Codec.Sexpr.Parser
+ other-modules: Codec.Sexpr.Parser
Codec.Sexpr.Printer
Codec.Sexpr.Internal
- build-depends: QuickCheck, random

View file

@ -0,0 +1,16 @@
diff --git a/System/Xattr.hsc b/System/Xattr.hsc
index adaf9cb..9b49996 100644
--- a/System/Xattr.hsc
+++ b/System/Xattr.hsc
@@ -45,11 +45,7 @@ module System.Xattr
where
#include <sys/types.h>
-#ifdef __APPLE__
#include <sys/xattr.h>
-#else
-#include <attr/xattr.h>
-#endif
import Data.Functor ((<$>))
import Foreign.C

View file

@ -0,0 +1,34 @@
diff --git a/src/XMonad/Core.hs b/src/XMonad/Core.hs
index 46a0939..92af53d 100644
--- a/src/XMonad/Core.hs
+++ b/src/XMonad/Core.hs
@@ -46,6 +46,7 @@ import Data.Traversable (for)
import Data.Time.Clock (UTCTime)
import Data.Default.Class
import Data.List (isInfixOf)
+import System.Environment (lookupEnv)
import System.FilePath
import System.IO
import System.Info
@@ -458,7 +459,8 @@ xfork x = io . forkProcess . finally nullStdin $ do
-- | Use @xmessage@ to show information to the user.
xmessage :: MonadIO m => String -> m ()
xmessage msg = void . xfork $ do
- executeFile "xmessage" True
+ xmessageBin <- fromMaybe "xmessage" <$> liftIO (lookupEnv "XMONAD_XMESSAGE")
+ executeFile xmessageBin True
[ "-default", "okay"
, "-xrm", "*international:true"
, "-xrm", "*fontSet:-*-fixed-medium-r-normal-*-18-*-*-*-*-*-*-*,-*-fixed-*-*-*-*-18-*-*-*-*-*-*-*,-*-*-*-*-*-*-18-*-*-*-*-*-*-*"
@@ -654,8 +656,9 @@ compile dirs method =
bracket (openFile (errFileName dirs) WriteMode) hClose $ \err -> do
let run = runProc (cfgDir dirs) err
case method of
- CompileGhc ->
- run "ghc" ghcArgs
+ CompileGhc -> do
+ ghc <- fromMaybe "ghc" <$> (lookupEnv "NIX_GHC")
+ run ghc ghcArgs
CompileStackGhc stackYaml ->
run "stack" ["build", "--silent", "--stack-yaml", stackYaml] .&&.
run "stack" ("ghc" : "--stack-yaml" : stackYaml : "--" : ghcArgs)