diff --git a/ChangeLog.md b/ChangeLog.md index c05ea1f15c..8646c35061 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -12,6 +12,11 @@ Behavior changes: Other enhancements: +* In YAML configuration files, the `msys-environment` key is introduced to + allow, on Windows, the MSYS2 environment to be specified. The default + environment is still `MINGW64` on 64-bit Windows and `MINGW32` on 32-bit + Windows. + Bug fixes: ## v2.15.1 diff --git a/doc/developing_on_windows.md b/doc/developing_on_windows.md index 26348d7369..1ad58030ac 100644 --- a/doc/developing_on_windows.md +++ b/doc/developing_on_windows.md @@ -3,11 +3,11 @@ # Developing on Windows # On Windows, Stack comes with an installation of [MSYS2](https://www.msys2.org/). -The MINGW64 (MINGW32 on 32-bit Windows) environment of MSYS2 will be used by -Stack to provide a Unix-like shell and environment for Stack. This may be -necessary for installing some Haskell packages, such as those which use -`configure` scripts, or if your project needs some additional tools during the -build phase. +An environment of MSYS2 (by default, `MINGW64` on 64-bit Windows or `MINGW32` on +32-bit Windows) will be used by Stack to provide a Unix-like shell and +environment for Stack. This may be necessary for installing some Haskell +packages, such as those which use `configure` scripts, or if your project needs +some additional tools during the build phase. No matter which terminal software you choose (Windows Terminal, Console Windows Host, Command Prompt, PowerShell, Git bash or any other) you can use this @@ -26,19 +26,26 @@ example, help about the operation `--sync` (or `-S`) can be obtained with `stack exec -- pacman --sync --help` or, equivalently, `stack exec -- pacman -Sh`. -Command `stack path --bin-path` to see the PATH in the Stack environment. On -Windows, it includes the `\mingw64\bin` (`\mingw32\bin` on 32-bit Windows), -`\usr\bin` and `\usr\local\bin` directories of the Stack-supplied MSYS2. If your -executable depends on files (for example, dynamic-link libraries) in those -directories and you want to run it outside of the Stack environment, you will -need to ensure copies of those files are on the PATH. +Command `stack path --bin-path` to see the PATH in the Stack environment. If the +relevant MSYS2 environment is `MINGW64`, on Windows, it includes the +`\mingw64\bin`, `\usr\bin` and `\usr\local\bin` directories of the +Stack-supplied MSYS2. (It includes the corresponding directory if the relevant +MSYS2 environment is other than `MINGW64`.) If your executable depends on files +(for example, dynamic-link libraries) in those directories and you want to run +it outside of the Stack environment, you will need to ensure copies of those +files are on the PATH. Command `stack path --extra-include-dirs` and `stack path --extra-library-dirs` to see the extra directories searched for C header files or system libraries -files in the Stack environment. On Windows, it includes the `\mingw64\include` -(`mingw32\include` on 32-bit Windows) (include) and the `\mingw64\lib` and -`\mingw64\bin` directories (`mingw32\lib` and `mingw32\bin` on 32-bit Windows) -(library) of the Stack-supplied MSYS2. +files in the Stack environment. If the relevant MSYS2 environment is `MINGW64`, +on Windows, it includes the `\mingw64\include` (include) and the `\mingw64\lib` +and `\mingw64\bin` directories (library) of the Stack-supplied MSYS2. (It +includes the corresponding directories if the relevant MSYS2 environment is +other than `MINGW64`.) + +For further information about configuring the relevant MSYS2 environment, see +Stack's [`msys-environment`](yaml_configuration.md#msys-environment) +configuration option. ## Updating the Stack-supplied MSYS2 ## diff --git a/doc/maintainers/stack_errors.md b/doc/maintainers/stack_errors.md index 4def92b68f..37d15095dd 100644 --- a/doc/maintainers/stack_errors.md +++ b/doc/maintainers/stack_errors.md @@ -5,7 +5,7 @@ In connection with considering Stack's support of the [Haskell Error Index](https://errors.haskell.org/) initiative, this page seeks to take stock of the errors that Stack itself can raise, by reference to the -`master` branch of the Stack repository. Last updated: 2023-12-24. +`master` branch of the Stack repository. Last updated: 2024-01-29. * `Stack.main`: catches exceptions from action `commandLineHandler`. @@ -420,6 +420,8 @@ to take stock of the errors that Stack itself can raise, by reference to the [S-7462] | StackWorkEnvNotRelativeDir String [S-3251] | MultiplePackageIndices [PackageIndexConfig] [S-5470] | DuplicateLocalPackageNames [(PackageName, [PackageLocation])] + [S-6854] | BadMsysEnvironment MsysEnvironment Arch + [S-5006] | NoDefaultMsysEnvironmentBug ~~~ - `Stack.Types.Config.ParseAbsolutePathException` diff --git a/doc/yaml_configuration.md b/doc/yaml_configuration.md index 06ae8c25f7..615cd10eb8 100644 --- a/doc/yaml_configuration.md +++ b/doc/yaml_configuration.md @@ -1230,6 +1230,18 @@ Whether to modify the code page for UTF-8 output. modify-code-page: false ~~~ +### msys-environment + +:octicons-tag-24: UNRELEASED + +Restrictions: Windows systems only. + +Default: `MINGW64` (64-bit Windows) or `MINGW32` (32-bit Windows) + +The name of the MSYS2 environment (case-sensitive) used in the Stack +environment. Valid environments are `CLANG32`, `CLANG64`, `CLANGARM64`, +`MINGW32`, `MINGW64`, and `UCRT64`. + ### nix [:octicons-tag-24: 0.1.10.0](https://github.com/commercialhaskell/stack/releases/tag/v0.1.10.0) diff --git a/package.yaml b/package.yaml index 0a80d40fba..e759531138 100644 --- a/package.yaml +++ b/package.yaml @@ -317,6 +317,7 @@ library: - Stack.Types.Installed - Stack.Types.IsMutable - Stack.Types.LockFileBehavior + - Stack.Types.MsysEnvironment - Stack.Types.NamedComponent - Stack.Types.Nix - Stack.Types.Package diff --git a/src/Stack/Config.hs b/src/Stack/Config.hs index 4151af45f2..1038ec5cc5 100644 --- a/src/Stack/Config.hs +++ b/src/Stack/Config.hs @@ -122,6 +122,8 @@ import Stack.Types.Casa ( CasaOptsMonoid (..) ) import Stack.Types.Docker ( DockerOpts (..), DockerOptsMonoid (..) ) import Stack.Types.DumpLogs ( DumpLogs (..) ) import Stack.Types.GlobalOpts ( GlobalOpts (..) ) +import Stack.Types.MsysEnvironment + ( MsysEnvironment (..), msysEnvArch ) import Stack.Types.Nix ( NixOpts (..) ) import Stack.Types.Platform ( PlatformVariant (..), platformOnlyRelDir ) @@ -311,6 +313,10 @@ configFromConfigMonoid installGHC = fromFirstTrue configMonoid.installGHC skipGHCCheck = fromFirstFalse configMonoid.skipGHCCheck skipMsys = fromFirstFalse configMonoid.skipMsys + defMsysEnvironment = case platform of + Platform I386 Windows -> Just MINGW32 + Platform X86_64 Windows -> Just MINGW64 + _ -> Nothing extraIncludeDirs = configMonoid.extraIncludeDirs extraLibDirs = configMonoid.extraLibDirs customPreprocessorExts = configMonoid.customPreprocessorExts @@ -325,6 +331,15 @@ configFromConfigMonoid requireStackVersion = simplifyVersionRange configMonoid.requireStackVersion.intersectingVersionRange compilerCheck = fromFirst MatchMinor configMonoid.compilerCheck + msysEnvironment <- case defMsysEnvironment of + -- Ignore the configuration setting if there is no default for the + -- platform. + Nothing -> pure Nothing + Just defMsysEnv -> do + let msysEnv = fromFirst defMsysEnv configMonoid.msysEnvironment + if msysEnvArch msysEnv == arch + then pure $ Just msysEnv + else prettyThrowM $ BadMsysEnvironment msysEnv arch platformVariant <- liftIO $ maybe PlatformVariantNone PlatformVariant <$> lookupEnv platformVariantEnvVar let build = buildOptsFromMonoid configMonoid.buildOpts @@ -541,6 +556,7 @@ configFromConfigMonoid , installGHC , skipGHCCheck , skipMsys + , msysEnvironment , compilerCheck , compilerRepository , localBin diff --git a/src/Stack/Constants.hs b/src/Stack/Constants.hs index 41c40830cd..93f6e780b8 100644 --- a/src/Stack/Constants.hs +++ b/src/Stack/Constants.hs @@ -89,6 +89,10 @@ module Stack.Constants , relDirMingw , relDirMingw32 , relDirMingw64 + , relDirClang32 + , relDirClang64 + , relDirClangArm64 + , relDirUcrt64 , relDirLocal , relDirUsr , relDirInclude @@ -513,6 +517,18 @@ relDirMingw32 = $(mkRelDir "mingw32") relDirMingw64 :: Path Rel Dir relDirMingw64 = $(mkRelDir "mingw64") +relDirClang32 :: Path Rel Dir +relDirClang32 = $(mkRelDir "clang32") + +relDirClang64 :: Path Rel Dir +relDirClang64 = $(mkRelDir "clang64") + +relDirClangArm64 :: Path Rel Dir +relDirClangArm64 = $(mkRelDir "clangarm64") + +relDirUcrt64 :: Path Rel Dir +relDirUcrt64 = $(mkRelDir "ucrt64") + relDirLocal :: Path Rel Dir relDirLocal = $(mkRelDir "local") diff --git a/src/Stack/Setup.hs b/src/Stack/Setup.hs index 21eb00afb0..aa5f64d4b5 100644 --- a/src/Stack/Setup.hs +++ b/src/Stack/Setup.hs @@ -727,7 +727,8 @@ setupEnv needTargets buildOptsCLI mResolveMissingGHC = do mGhcRtsEnvVar <- liftIO $ lookupEnv "GHCRTS" envRef <- liftIO $ newIORef Map.empty - let getProcessContext' es = do + let msysEnv = maybe "" (T.pack . show) config.msysEnvironment + getProcessContext' es = do m <- readIORef envRef case Map.lookup es m of Just eo -> pure eo @@ -753,9 +754,9 @@ setupEnv needTargets buildOptsCLI mResolveMissingGHC = do $ case (sopts.skipMsys, platform) of (False, Platform Cabal.I386 Cabal.Windows) -> - Map.insert "MSYSTEM" "MINGW32" + Map.insert "MSYSTEM" msysEnv (False, Platform Cabal.X86_64 Cabal.Windows) -> - Map.insert "MSYSTEM" "MINGW64" + Map.insert "MSYSTEM" msysEnv _ -> id -- See https://github.com/commercialhaskell/stack/issues/3444 diff --git a/src/Stack/Setup/Installed.hs b/src/Stack/Setup/Installed.hs index c1f02c905d..18d2321fe7 100644 --- a/src/Stack/Setup/Installed.hs +++ b/src/Stack/Setup/Installed.hs @@ -32,14 +32,16 @@ import Path ( (), filename, parseRelDir, parseRelFile ) import Path.IO ( doesDirExist, ignoringAbsence, listDir, removeFile ) import RIO.Process ( HasProcessContext, proc, readProcess_ ) import Stack.Constants - ( relDirBin, relDirInclude, relDirLib, relDirLocal, relDirMingw - , relDirMingw32, relDirMingw64, relDirUsr + ( relDirBin, relDirInclude, relDirLib, relDirLocal + , relDirMingw, relDirUsr ) import Stack.Prelude import Stack.Types.Compiler ( ActualCompiler (..), WhichCompiler (..) ) import Stack.Types.Config ( Config (..), HasConfig (..) ) +import Stack.Types.Config.Exception ( ConfigPrettyException (..) ) import Stack.Types.ExtraDirs ( ExtraDirs (..) ) +import Stack.Types.MsysEnvironment ( relDirMsysEnv ) data Tool = Tool PackageIdentifier -- ^ e.g. ghc-7.8.4, msys2-20150512 @@ -137,6 +139,9 @@ toolExtraDirs :: HasConfig env => Tool -> RIO env ExtraDirs toolExtraDirs tool = do config <- view configL dir <- installDir config.localPrograms tool + msysEnv <- case config.msysEnvironment of + Just msysEnv -> pure msysEnv + Nothing -> throwM NoMsysEnvironmentBug case (config.platform, toolNameString tool) of (Platform _ Cabal.Windows, isGHC -> True) -> pure mempty { bins = @@ -146,30 +151,30 @@ toolExtraDirs tool = do } (Platform Cabal.I386 Cabal.Windows, "msys2") -> pure mempty { bins = - [ dir relDirMingw32 relDirBin + [ dir relDirMsysEnv msysEnv relDirBin , dir relDirUsr relDirBin , dir relDirUsr relDirLocal relDirBin ] , includes = - [ dir relDirMingw32 relDirInclude + [ dir relDirMsysEnv msysEnv relDirInclude ] , libs = - [ dir relDirMingw32 relDirLib - , dir relDirMingw32 relDirBin + [ dir relDirMsysEnv msysEnv relDirLib + , dir relDirMsysEnv msysEnv relDirBin ] } (Platform Cabal.X86_64 Cabal.Windows, "msys2") -> pure mempty { bins = - [ dir relDirMingw64 relDirBin + [ dir relDirMsysEnv msysEnv relDirBin , dir relDirUsr relDirBin , dir relDirUsr relDirLocal relDirBin ] , includes = - [ dir relDirMingw64 relDirInclude + [ dir relDirMsysEnv msysEnv relDirInclude ] , libs = - [ dir relDirMingw64 relDirLib - , dir relDirMingw64 relDirBin + [ dir relDirMsysEnv msysEnv relDirLib + , dir relDirMsysEnv msysEnv relDirBin ] } (_, isGHC -> True) -> pure mempty diff --git a/src/Stack/Types/Config.hs b/src/Stack/Types/Config.hs index a2698c3dfd..fe20cd70b0 100644 --- a/src/Stack/Types/Config.hs +++ b/src/Stack/Types/Config.hs @@ -43,6 +43,7 @@ import Stack.Types.Docker ( DockerOpts ) import Stack.Types.DumpLogs ( DumpLogs ) import Stack.Types.EnvSettings ( EnvSettings ) import Stack.Types.GHCVariant ( GHCVariant (..), HasGHCVariant (..) ) +import Stack.Types.MsysEnvironment ( MsysEnvironment ) import Stack.Types.Nix ( NixOpts ) import Stack.Types.Platform ( HasPlatform (..), PlatformVariant ) import Stack.Types.Project ( Project (..) ) @@ -100,6 +101,9 @@ data Config = Config -- ^ Don't bother checking the GHC version or architecture. , skipMsys :: !Bool -- ^ On Windows: don't use a sandboxed MSYS + , msysEnvironment :: !(Maybe MsysEnvironment) + -- ^ On Windows: what MSYS2 environment to apply. Nothing on other operating + -- systems. , compilerCheck :: !VersionCheck -- ^ Specifies which versions of the compiler are acceptable. , compilerRepository :: !CompilerRepository diff --git a/src/Stack/Types/Config/Exception.hs b/src/Stack/Types/Config/Exception.hs index daf363855d..30e5d0abd4 100644 --- a/src/Stack/Types/Config/Exception.hs +++ b/src/Stack/Types/Config/Exception.hs @@ -14,12 +14,14 @@ module Stack.Types.Config.Exception import qualified Data.Text as T import Data.Yaml ( ParseException ) import qualified Data.Yaml as Yaml +import Distribution.System ( Arch ) import Path( dirname, filename ) import Stack.Prelude import Stack.Types.ConfigMonoid ( configMonoidAllowDifferentUserName , configMonoidGHCVariantName, configMonoidSystemGHCName ) +import Stack.Types.MsysEnvironment ( MsysEnvironment ) import Stack.Types.Version ( VersionRange, stackVersion, versionRangeText ) @@ -159,6 +161,8 @@ data ConfigPrettyException | StackWorkEnvNotRelativeDir !String | MultiplePackageIndices [PackageIndexConfig] | DuplicateLocalPackageNames ![(PackageName, [PackageLocation])] + | BadMsysEnvironment !MsysEnvironment !Arch + | NoMsysEnvironmentBug deriving (Show, Typeable) instance Pretty ConfigPrettyException where @@ -214,9 +218,10 @@ instance Pretty ConfigPrettyException where "[S-5470]" <> line <> fillSep - [ flow "The same package name is used in more than one local package or" - , style Shell "extra-deps" <> "." - ] + [ flow "The same package name is used in more than one local package \ + \or" + , style Shell "extra-deps" <> "." + ] <> mconcat (map go pairs) where go (name, dirs) = @@ -227,6 +232,17 @@ instance Pretty ConfigPrettyException where ] <> line <> bulletedList (map (fromString . T.unpack . textDisplay) dirs) + pretty (BadMsysEnvironment msysEnv arch) = + "[S-6854]" + <> line + <> fillSep + [ flow "The specified MSYS2 environment" + , style Error (fromString $ show msysEnv) + , flow "is not consistent with the architecture" + , fromString (show arch) <> "." + ] + pretty NoMsysEnvironmentBug = bugPrettyReport "[S-5006]" $ + flow "No default MSYS2 environment." instance Exception ConfigPrettyException diff --git a/src/Stack/Types/ConfigMonoid.hs b/src/Stack/Types/ConfigMonoid.hs index b691e9ff5e..c4418ad44e 100644 --- a/src/Stack/Types/ConfigMonoid.hs +++ b/src/Stack/Types/ConfigMonoid.hs @@ -45,6 +45,7 @@ import Stack.Types.DumpLogs ( DumpLogs ) import Stack.Types.GhcOptionKey ( GhcOptionKey (..) ) import Stack.Types.GhcOptions ( GhcOptions (..) ) import Stack.Types.GHCVariant ( GHCVariant ) +import Stack.Types.MsysEnvironment ( MsysEnvironment ) import Stack.Types.Nix ( NixOptsMonoid ) import Stack.Types.PvpBounds ( PvpBounds ) import Stack.Types.SCM ( SCM ) @@ -54,8 +55,8 @@ import Stack.Types.Version ( IntersectingVersionRange (..), VersionCheck ) import qualified System.FilePath as FilePath --- | An uninterpreted representation of configuration options. --- Configurations may be "cascaded" using mappend (left-biased). +-- | An uninterpreted representation of configuration options. Configurations +-- may be "cascaded" using mappend (left-biased). data ConfigMonoid = ConfigMonoid { stackRoot :: !(First (Path Abs Dir)) -- ^ See: 'clStackRoot' @@ -87,6 +88,8 @@ data ConfigMonoid = ConfigMonoid -- ^ See: 'configSkipGHCCheck' , skipMsys :: !FirstFalse -- ^ See: 'configSkipMsys' + , msysEnvironment :: !(First MsysEnvironment) + -- ^ See: 'configMsysEnvironment' , compilerCheck :: !(First VersionCheck) -- ^ See: 'configCompilerCheck' , compilerRepository :: !(First CompilerRepository) @@ -237,6 +240,7 @@ parseConfigMonoidObject rootDir obj = do installGHC <- FirstTrue <$> obj ..:? configMonoidInstallGHCName skipGHCCheck <- FirstFalse <$> obj ..:? configMonoidSkipGHCCheckName skipMsys <- FirstFalse <$> obj ..:? configMonoidSkipMsysName + msysEnvironment <- First <$> obj ..:? configMonoidMsysEnvironmentName requireStackVersion <- IntersectingVersionRange . (.versionRangeJSON) <$> ( obj ..:? configMonoidRequireStackVersionName @@ -345,6 +349,7 @@ parseConfigMonoidObject rootDir obj = do , installGHC , skipGHCCheck , skipMsys + , msysEnvironment , compilerCheck , compilerRepository , requireStackVersion @@ -441,6 +446,9 @@ configMonoidSkipGHCCheckName = "skip-ghc-check" configMonoidSkipMsysName :: Text configMonoidSkipMsysName = "skip-msys" +configMonoidMsysEnvironmentName :: Text +configMonoidMsysEnvironmentName = "msys-environment" + configMonoidRequireStackVersionName :: Text configMonoidRequireStackVersionName = "require-stack-version" diff --git a/src/Stack/Types/MsysEnvironment.hs b/src/Stack/Types/MsysEnvironment.hs new file mode 100644 index 0000000000..9a6d7159a1 --- /dev/null +++ b/src/Stack/Types/MsysEnvironment.hs @@ -0,0 +1,65 @@ +{-# LANGUAGE NoImplicitPrelude #-} + +-- | Type representing MSYS2 environments and related functions. +module Stack.Types.MsysEnvironment + ( MsysEnvironment (..) + , msysEnvArch + , relDirMsysEnv + ) where + +import Data.Aeson.Types ( FromJSON (..) ) +import Distribution.System ( Arch (..) ) +import Stack.Constants + ( relDirClang32, relDirClang64, relDirClangArm64 + , relDirMingw32, relDirMingw64, relDirUcrt64 + ) +import Stack.Prelude + +-- | Type representing MSYS2 environments. +data MsysEnvironment + = CLANG32 + | CLANG64 + | CLANGARM64 + | MINGW32 + -- ^ Stack's default on architecture i386, and applied if GHC version is + -- earlier than GHC 9.6. + | MINGW64 + -- ^ Stack's default on architecture x86_64, and applied if GHC version is + -- earlier than GHC 9.6. + | UCRT64 + deriving (Eq, Ord, Show) + +-- | MSYS2 environment names are treated as case sensitive. +instance FromJSON MsysEnvironment where + parseJSON v = do + s <- parseJSON v + case s of + "CLANG32" -> pure CLANG32 + "CLANG64" -> pure CLANG64 + "CLANGARM64" -> pure CLANGARM64 + "MINGW32" -> pure MINGW32 + "MINGW64" -> pure MINGW64 + "UCRT64" -> pure UCRT64 + _ -> fail ("Unknown MSYS2 environment: " <> s) + +-- | Function that yields the architecture relevant to an MSYS2 environment, +-- based on https://www.msys2.org/docs/environments/. +msysEnvArch :: MsysEnvironment -> Arch +msysEnvArch env = case env of + CLANG32 -> I386 + CLANG64 -> X86_64 + CLANGARM64 -> AArch64 + MINGW32 -> I386 + MINGW64 -> X86_64 + UCRT64 -> X86_64 + +-- | Function that yields the prefix relevant to an MSYS2 environment, based on +-- https://www.msys2.org/docs/environments/. +relDirMsysEnv :: MsysEnvironment -> Path Rel Dir +relDirMsysEnv env = case env of + CLANG32 -> relDirClang32 + CLANG64 -> relDirClang64 + CLANGARM64 -> relDirClangArm64 + MINGW32 -> relDirMingw32 + MINGW64 -> relDirMingw64 + UCRT64 -> relDirUcrt64 diff --git a/stack.cabal b/stack.cabal index dd5b2f8813..a4739880f2 100644 --- a/stack.cabal +++ b/stack.cabal @@ -311,6 +311,7 @@ library Stack.Types.Installed Stack.Types.IsMutable Stack.Types.LockFileBehavior + Stack.Types.MsysEnvironment Stack.Types.NamedComponent Stack.Types.Nix Stack.Types.Package diff --git a/tests/integration/tests/6457-msys-environment/Main.hs b/tests/integration/tests/6457-msys-environment/Main.hs new file mode 100644 index 0000000000..efd730ccd7 --- /dev/null +++ b/tests/integration/tests/6457-msys-environment/Main.hs @@ -0,0 +1,9 @@ +import StackTest + +import Control.Monad ( when ) + +main :: IO () +main = when isWindows $ do + stack ["exec", "--", "pacman", "-S", "--noconfirm", "mingw-w64-ucrt-x86_64-gsl"] + stack ["build"] + stack ["exec", "--", "foo"] diff --git a/tests/integration/tests/6457-msys-environment/files/Main.hs b/tests/integration/tests/6457-msys-environment/files/Main.hs new file mode 100644 index 0000000000..76919d9ea3 --- /dev/null +++ b/tests/integration/tests/6457-msys-environment/files/Main.hs @@ -0,0 +1,12 @@ +module Main (main) where + +import Foreign.C.Types + +foreign import ccall "gsl/gsl_sf_bessel.h gsl_sf_bessel_J0" + gsl_sf_bessel_J0 :: CDouble -> CDouble + +main :: IO () +main = do + let x = CDouble 5.0 + result = gsl_sf_bessel_J0 x + putStrLn $ "J0(" ++ show x ++ ") = " ++ show result diff --git a/tests/integration/tests/6457-msys-environment/files/Setup.hs b/tests/integration/tests/6457-msys-environment/files/Setup.hs new file mode 100644 index 0000000000..9a994af677 --- /dev/null +++ b/tests/integration/tests/6457-msys-environment/files/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/tests/integration/tests/6457-msys-environment/files/foo.cabal b/tests/integration/tests/6457-msys-environment/files/foo.cabal new file mode 100644 index 0000000000..f007e34101 --- /dev/null +++ b/tests/integration/tests/6457-msys-environment/files/foo.cabal @@ -0,0 +1,11 @@ +cabal-version: 2.2 +name: foo +version: 0.1.0.0 +build-type: Simple + +executable foo + main-is: Main.hs + ghc-options: -threaded -rtsopts -with-rtsopts=-N + extra-libraries: gsl + build-depends: base >=4.7 && <5 + default-language: Haskell2010 diff --git a/tests/integration/tests/6457-msys-environment/files/stack.yaml b/tests/integration/tests/6457-msys-environment/files/stack.yaml new file mode 100644 index 0000000000..1ce8f6529c --- /dev/null +++ b/tests/integration/tests/6457-msys-environment/files/stack.yaml @@ -0,0 +1,2 @@ +snapshot: lts-22.7 +msys-environment: UCRT64