xcframework
Safe HaskellNone
LanguageGHC2021

Distribution.XCFramework.SetupHooks

Description

Module to automatically produce a XCFramework binary distribution package from a Haskell library

Synopsis

Documentation

data SetupHooks #

Hooks into the cabal build phases.

Usage:

  • In your .cabal file, declare build-type: Hooks (with a cabal-version greater than or equal to 3.14),
  • In your .cabal file, include a custom-setup stanza which declares the dependencies of your SetupHooks module; this will usually contain a dependency on the Cabal-hooks package.
  • Provide a SetupHooks.hs module next to your .cabal file; it must export setupHooks :: SetupHooks.

Instances

Instances details
Monoid SetupHooks 
Instance details

Defined in Distribution.Simple.SetupHooks.Internal

Semigroup SetupHooks

SetupHooks can be combined monoidally. This is useful to combine setup hooks defined by another package with your own package-specific hooks.

Warning: this Semigroup instance is not commutative.

Instance details

Defined in Distribution.Simple.SetupHooks.Internal

xcframeworkHooks Source #

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.