Skip to content

Commit d97e0cb

Browse files
authored
Merge pull request #867 from alexfmpe/nixpkgs-20.09
Nixpkgs 20.09
2 parents 0286e94 + aef2f96 commit d97e0cb

File tree

5 files changed

+30
-16
lines changed

5 files changed

+30
-16
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This project's release branch is `master`. This log is written from the perspective of the release branch: when changes hit `master`, they are considered released.
44

5+
## Unreleased
6+
7+
* Update reflex-platform to v0.9.0.0
8+
59
## v0.9.3.0 - 2021-12-30
610

711
* Update reflex-platform to v0.8.0.3

dep/reflex-platform/github.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"owner": "reflex-frp",
33
"repo": "reflex-platform",
4-
"branch": "nixpkgs-20.03",
4+
"branch": "release/0.9.0.0",
55
"private": false,
6-
"rev": "52e00a07baccac3171dea0e237e74444bbf07ef4",
7-
"sha256": "00a5kg0apf08sa54vf4rk4zjl9yq994pdckjkz4113kbsh2hbyan"
6+
"rev": "e8e56516b1df0c6e7024bc0e690f54fcddf79a19",
7+
"sha256": "0xb2hdps7bsyd6y84if3317w9fbcpcjh4whrvrhz6mskcw069xjp"
88
}

haskell-overlays/misc-deps.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ let
99
in
1010

1111
{
12+
# Actually broken in current nixpkgs master due to MonadFail changes
13+
git = haskellLib.markUnbroken super.git;
14+
15+
# hpack requires cabal >= 3.0 but the ghc865 package set builds it with 2.4 by default
16+
hpack = super.hpack.overrideScope (self: super: { Cabal = self.Cabal_3_2_0_0; });
17+
18+
1219
regex-base = self.callHackage "regex-base" "0.94.0.0" {};
1320
regex-posix = self.callHackage "regex-posix" "0.96.0.0" {};
1421
regex-tdfa = self.callHackage "regex-tdfa" "1.3.1.0" {};

lib/command/src/Obelisk/Command/Preprocessor.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Data.List (intersperse, isPrefixOf, sortOn)
1010
import Data.Maybe (fromMaybe)
1111
import qualified Data.Text.Lazy.Builder as TL
1212
import qualified Data.Text.Lazy.Encoding as TL
13-
import Distribution.Compiler (CompilerFlavor (..))
13+
import Distribution.Compiler (CompilerFlavor (..), perCompilerFlavorToList)
1414
import Language.Haskell.Extension (Extension (..), Language(..))
1515
import System.Directory (canonicalizePath)
1616
import System.IO (IOMode (..), hPutStrLn, stderr, withFile)
@@ -88,7 +88,9 @@ generateHeader origPath packageInfo =
8888
ghcOptList
8989
= filter (not . isPrefixOf "-O")
9090
$ fromMaybe []
91-
$ lookup GHC (_cabalPackageInfo_compilerOptions packageInfo)
91+
$ lookup GHC
92+
$ perCompilerFlavorToList
93+
$ _cabalPackageInfo_compilerOptions packageInfo
9294
optList = _cabalPackageInfo_cppOptions packageInfo <> ghcOptList
9395

9496
lineNumberPragma :: FilePath -> TL.Builder

lib/command/src/Obelisk/Command/Run.hs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ import Data.Time.Clock (getCurrentTime)
4343
import Data.Time.Format (formatTime, defaultTimeLocale)
4444
import Data.Traversable (for)
4545
import Debug.Trace (trace)
46-
import Distribution.Compiler (CompilerFlavor(..))
47-
import Distribution.PackageDescription.Parsec (parseGenericPackageDescription)
48-
import Distribution.Parsec.ParseResult (runParseResult)
46+
import Distribution.Compiler (CompilerFlavor(..), PerCompilerFlavor)
47+
import Distribution.PackageDescription.Parsec (parseGenericPackageDescription, runParseResult)
48+
import Distribution.Parsec.Warning (PWarning)
4949
import Distribution.Pretty (prettyShow)
5050
import Distribution.Simple.Compiler (PackageDB (GlobalPackageDB))
5151
import Distribution.Simple.Configure (configCompilerEx, getInstalledPackages)
@@ -54,14 +54,15 @@ import Distribution.Simple.Program.Db (defaultProgramDb)
5454
import qualified Distribution.System as Dist
5555
import Distribution.Types.BuildInfo (buildable, cppOptions, defaultExtensions, defaultLanguage, hsSourceDirs, options, targetBuildDepends)
5656
import Distribution.Types.CondTree (simplifyCondTree)
57-
import Distribution.Types.Dependency (Dependency (..), depPkgName)
58-
import Distribution.Types.GenericPackageDescription (ConfVar (Arch, Impl, OS), condLibrary)
57+
import Distribution.Types.ConfVar (ConfVar (Arch, Impl, OS))
58+
import Distribution.Types.Dependency (Dependency (..), depPkgName, depVerRange)
59+
import Distribution.Types.GenericPackageDescription (condLibrary)
5960
import Distribution.Types.InstalledPackageInfo (compatPackageKey)
6061
import Distribution.Types.Library (libBuildInfo)
62+
import Distribution.Types.LibraryName (LibraryName(..))
6163
import Distribution.Types.PackageName (mkPackageName)
6264
import Distribution.Types.VersionRange (anyVersion)
6365
import Distribution.Utils.Generic (toUTF8BS, readUTF8File)
64-
import qualified Distribution.Parsec.Common as Dist
6566
import qualified Distribution.Verbosity as Verbosity (silent)
6667
import qualified Hpack.Config as Hpack
6768
import qualified Hpack.Render as Hpack
@@ -103,7 +104,7 @@ data CabalPackageInfo = CabalPackageInfo
103104
-- ^ List of globally enable extensions of the library component
104105
, _cabalPackageInfo_defaultLanguage :: Maybe Language
105106
-- ^ List of globally set languages of the library component
106-
, _cabalPackageInfo_compilerOptions :: [(CompilerFlavor, [String])]
107+
, _cabalPackageInfo_compilerOptions :: PerCompilerFlavor [String]
107108
-- ^ List of compiler-specific options (e.g., the "ghc-options" field of the cabal file)
108109
, _cabalPackageInfo_cppOptions :: [String]
109110
-- ^ List of CPP (C Preprocessor) options (e.g. the "cpp-options" field of the cabal file)
@@ -338,7 +339,7 @@ parseCabalPackage dir = parseCabalPackage' dir >>= \case
338339
parseCabalPackage'
339340
:: (MonadIO m)
340341
=> FilePath -- ^ Package directory
341-
-> m (Either T.Text (Maybe ([Dist.PWarning], CabalPackageInfo)))
342+
-> m (Either T.Text (Maybe ([PWarning], CabalPackageInfo)))
342343
parseCabalPackage' pkg = runExceptT $ do
343344
(cabalContents, packageFile, packageName) <- guessCabalPackageFile pkg >>= \case
344345
Left GuessPackageFileError_NotFound -> throwError $ "No .cabal or package.yaml file found in " <> T.pack pkg
@@ -383,7 +384,7 @@ parseCabalPackage' pkg = runExceptT $ do
383384
}
384385
Right Nothing -> pure Nothing
385386
Left (_, errors) ->
386-
throwError $ T.pack $ "Failed to parse " <> packageFile <> ":\n" <> unlines (map show errors)
387+
throwError $ T.pack $ "Failed to parse " <> packageFile <> ":\n" <> unlines (map show $ toList errors)
387388

388389
parsePackagesOrFail :: (MonadObelisk m, Foldable f) => f FilePath -> m (NE.NonEmpty CabalPackageInfo)
389390
parsePackagesOrFail dirs' = do
@@ -502,9 +503,9 @@ getGhciSessionSettings (toList -> packageInfos) pathBase useRelativePaths = do
502503
map (dependencyPackageId installedPackageIndex) $
503504
filter ((`notElem` packageNames) . depPkgName) $
504505
concatMap _cabalPackageInfo_buildDepends packageInfos <>
505-
[Dependency (mkPackageName "obelisk-run") anyVersion]
506+
[Dependency (mkPackageName "obelisk-run") anyVersion (Set.singleton LMainLibName)]
506507
dependencyPackageId installedPackageIndex dep =
507-
case lookupDependency installedPackageIndex dep of
508+
case lookupDependency installedPackageIndex (depPkgName dep) (depVerRange dep) of
508509
((_version,installedPackageInfo:_) :_) ->
509510
compatPackageKey installedPackageInfo
510511
_ -> error $ "Couldn't resolve dependency for " <> prettyShow dep

0 commit comments

Comments
 (0)