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
.cabal
file, declarebuild-type: Hooks
(with acabal-version
greater than or equal to3.14
), - In your
.cabal
file, include acustom-setup
stanza which declares the dependencies of yourSetupHooks
module; this will usually contain a dependency on theCabal-hooks
package. - Provide a
SetupHooks.hs
module next to your.cabal
file; 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.