| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Distribution.XCFramework.SetupHooks
Description
Module to automatically produce a XCFramework binary distribution package from a Haskell library
Synopsis
- data SetupHooks
- xcframeworkHooks :: FilePath -> SetupHooks
Documentation
data SetupHooks #
Hooks into the cabal build phases.
Usage:
- In your
.cabalfile, declarebuild-type: Hooks(with acabal-versiongreater than or equal to3.14), - In your
.cabalfile, include acustom-setupstanza which declares the dependencies of yourSetupHooksmodule; this will usually contain a dependency on theCabal-hookspackage. - Provide a
SetupHooks.hsmodule next to your.cabalfile; it must exportsetupHooks :: SetupHooks.
Instances
| Monoid SetupHooks | |
Defined in Distribution.Simple.SetupHooks.Internal Methods mempty :: SetupHooks # mappend :: SetupHooks -> SetupHooks -> SetupHooks # mconcat :: [SetupHooks] -> SetupHooks # | |
| Semigroup SetupHooks |
Warning: this |
Defined in Distribution.Simple.SetupHooks.Internal Methods (<>) :: SetupHooks -> SetupHooks -> SetupHooks # sconcat :: NonEmpty SetupHooks -> SetupHooks # stimes :: Integral b => b -> SetupHooks -> SetupHooks # | |
Arguments
| :: FilePath | XCFramework result output filepath (must end with .xcframework) |
| -> SetupHooks |
Add these hooks to your setupHooks in SetupHooks.hs to automatically
produce at the given location an xcframework from the Haskell library
component being built.
Non-library components (tests and executables) are ignored.
The resulting XCFramework includes the RTS and FFI headers, and the dylib (TODO: configurable?) resulting from building the library component.