packages feed

mpv-bindgen-sys-0.0.0.1: mpv-bindgen-sys.cabal

cabal-version: 2.2

-- This file has been generated from package.yaml by hpack version 0.39.6.
--
-- see: https://github.com/sol/hpack
--
-- hash: "\ETX\230\143*\198&B]\CAN\134\STX+\222\167\FS\210\179\131.\142\189\235\219\201\DC3 \140h\241w\162\191"

name:           mpv-bindgen-sys
version:        0.0.0.1
synopsis:       Complete libmpv bindings, raw + curated, generated by hs-bindgen
description:    Machine-generated low-level bindings to the whole libmpv client API
                (client, render, OpenGL render, and stream callback headers): the raw
                hs-bindgen output (@Mpv.Sys.Bindgen.*@) plus a curated @Mpv.Sys@ layer
                with per-function safe/unsafe FFI decisions and native Haskell scalars.
                libmpv's own header documentation rides along in the haddocks.
                .
                A generated translation unit of C @_Static_assert@s checks the baked
                layouts against your installed libmpv at every build, so ABI divergence
                is a compile error rather than memory corruption.
                .
                Supports 64-bit Linux, macOS, and Windows, with libmpv client API >= 2.0
                development headers present. See the README for a quick start, the
                licensing note (libmpv itself is GPLv2+ by default), and the list of
                deliberate omissions.
category:       Media
homepage:       https://github.com/jtnuttall/lithon#readme
bug-reports:    https://github.com/jtnuttall/lithon/issues
author:         Jeremy Nuttall
maintainer:     jeremy@jeremy-nuttall.com
copyright:      (c) 2026 Jeremy Nuttall
license:        BSD-3-Clause
license-files:  LICENSE,
                LICENSE_libmpv,
                LICENSE_hs-bindgen-runtime,
                LICENSE_c-expr-runtime
build-type:     Simple
tested-with:
    GHC == 9.8.* || == 9.10.* || == 9.12.* || == 9.14.*
extra-doc-files:
    README.md
    CHANGELOG.md

source-repository head
  type: git
  location: https://github.com/jtnuttall/lithon
  subdir: mpv-bindgen-sys

flag abi-assertions
  description: Verify the baked ABI layout against the system libmpv headers at build time
               via generated C static assertions (disable only to diagnose)
  manual: True
  default: True

flag abi-assertions-exact
  description: Assert every sizeof exactly, including any union-member structs the default
               lets libmpv append to. For maintainers checking a newer libmpv; consumers
               should leave it off. Only has an effect together with abi-assertions.
  manual: True
  default: False

flag optimize
  description: Build with -O2. Package ghc-options win over cabal's optimization setting, so use
               -f -optimize for faster iterative builds of this large package.
  manual: True
  default: True

flag optimize-aggressively
  description: Build with expensive optimizations. Consider this the release build: slow, but paid once if
               caching is set up, so it may be worth it for artifacts you intend to ship.
               .
               Currently: -O2 -fexpose-all-unfoldings -flate-specialise -flate-dmd-anal -fstg-lift-lams.
  manual: True
  default: False

flag strict
  description: EXPERIMENTAL: compile the generated modules with Strict.
               .
               The emitted hs-bindgen code has not been audited for laziness dependence; main library only.
               .
               NB: Implies StrictData (GHC semantics), so -f -strict-data does not undo strict fields.
  manual: True
  default: False

flag strict-data
  description: Compile the generated modules with StrictData (strict fields on every generated
               record). Main library only; the vendored runtime keeps its upstream semantics.
               Disable if you need lazy fields.
  manual: True
  default: True

library
  exposed-modules:
      Mpv.Sys
      Mpv.Sys.Bindgen.Client
      Mpv.Sys.Bindgen.Client.FunPtr
      Mpv.Sys.Bindgen.Client.Safe
      Mpv.Sys.Bindgen.Client.Unsafe
      Mpv.Sys.Bindgen.Render
      Mpv.Sys.Bindgen.Render.FunPtr
      Mpv.Sys.Bindgen.Render.Safe
      Mpv.Sys.Bindgen.Render.Unsafe
      Mpv.Sys.Bindgen.RenderGl
      Mpv.Sys.Bindgen.Runtime
      Mpv.Sys.Bindgen.Runtime.BitfieldPtr
      Mpv.Sys.Bindgen.Runtime.Block
      Mpv.Sys.Bindgen.Runtime.CBool
      Mpv.Sys.Bindgen.Runtime.CEnum
      Mpv.Sys.Bindgen.Runtime.CExpr
      Mpv.Sys.Bindgen.Runtime.ConstantArray
      Mpv.Sys.Bindgen.Runtime.FLAM
      Mpv.Sys.Bindgen.Runtime.HasCBitfield
      Mpv.Sys.Bindgen.Runtime.HasCField
      Mpv.Sys.Bindgen.Runtime.HasFFIType
      Mpv.Sys.Bindgen.Runtime.IncompleteArray
      Mpv.Sys.Bindgen.Runtime.IsArray
      Mpv.Sys.Bindgen.Runtime.Macro
      Mpv.Sys.Bindgen.Runtime.Marshal
      Mpv.Sys.Bindgen.Runtime.Overloading
      Mpv.Sys.Bindgen.Runtime.PtrConst
      Mpv.Sys.Bindgen.Runtime.Struct
      Mpv.Sys.Bindgen.Runtime.Union
      Mpv.Sys.Bindgen.StreamCb
      Mpv.Sys.Bindgen.StreamCb.FunPtr
      Mpv.Sys.Bindgen.StreamCb.Safe
      Mpv.Sys.Bindgen.StreamCb.Unsafe
      Mpv.Sys.Client
      Mpv.Sys.Render
      Mpv.Sys.RenderGl
      Mpv.Sys.Runtime
      Mpv.Sys.StreamCb
  other-modules:
      Paths_mpv_bindgen_sys
  autogen-modules:
      Paths_mpv_bindgen_sys
  hs-source-dirs:
      src
  ghc-options: -optc-Wno-incompatible-pointer-types -optc-Wno-incompatible-function-pointer-types
  pkgconfig-depends:
      mpv >= 2.0
  build-depends:
      base >=4.17 && <4.23
    , bindgen-runtime
    , cexpr-runtime
  default-language: GHC2021
  if flag(abi-assertions)
    c-sources:
        cbits/abi_assertions.c
  if flag(abi-assertions-exact)
    cc-options: -DLITHON_ABI_EXACT
  if flag(strict-data)
    default-extensions:
        StrictData
  if flag(strict)
    default-extensions:
        Strict
  if flag(optimize)
    ghc-options: -O2
  if flag(optimize-aggressively)
    ghc-options: -O2 -fexpose-all-unfoldings -flate-specialise -flate-dmd-anal -fstg-lift-lams

library bindgen-runtime
  exposed-modules:
      HsBindgen.Runtime.BitfieldPtr
      HsBindgen.Runtime.Block
      HsBindgen.Runtime.CBool
      HsBindgen.Runtime.CEnum
      HsBindgen.Runtime.ConstantArray
      HsBindgen.Runtime.FLAM
      HsBindgen.Runtime.HasCBitfield
      HsBindgen.Runtime.HasCField
      HsBindgen.Runtime.HasFFIType
      HsBindgen.Runtime.IncompleteArray
      HsBindgen.Runtime.IsArray
      HsBindgen.Runtime.LibC
      HsBindgen.Runtime.Macro
      HsBindgen.Runtime.Marshal
      HsBindgen.Runtime.Overloading
      HsBindgen.Runtime.Prelude
      HsBindgen.Runtime.PtrConst
      HsBindgen.Runtime.Struct
      HsBindgen.Runtime.Support
      HsBindgen.Runtime.Support.Bitfield
      HsBindgen.Runtime.Support.ByteArray
      HsBindgen.Runtime.Support.CAPI
      HsBindgen.Runtime.Support.CompatHasField
      HsBindgen.Runtime.Support.FunPtr
      HsBindgen.Runtime.Support.FunPtr.Class
      HsBindgen.Runtime.Support.LibC.Auxiliary
      HsBindgen.Runtime.Support.Ptr
      HsBindgen.Runtime.Support.SizedByteArray
      HsBindgen.Runtime.Support.TH.Instances
      HsBindgen.Runtime.Support.TH.Types
      HsBindgen.Runtime.Union
  other-modules:
      Paths_mpv_bindgen_sys
  autogen-modules:
      Paths_mpv_bindgen_sys
  hs-source-dirs:
      runtime
  default-extensions:
      DataKinds
      DefaultSignatures
      DeriveAnyClass
      DerivingStrategies
      DerivingVia
      FunctionalDependencies
      LambdaCase
      PatternSynonyms
      RecordWildCards
      RoleAnnotations
      ScopedTypeVariables
      TypeFamilies
      UndecidableInstances
      ViewPatterns
  build-tool-depends:
      hsc2hs:hsc2hs
  build-depends:
      base >=4.17 && <4.23
    , bytestring >=0.11 && <0.13
    , containers >=0.6 && <0.9
    , primitive ==0.9.*
    , record-hasfield >=1.0 && <2
    , template-haskell >=2.19 && <2.25
    , vector ==0.13.*
  default-language: GHC2021
  if flag(optimize)
    ghc-options: -O2
  if flag(optimize-aggressively)
    ghc-options: -O2 -fexpose-all-unfoldings -flate-specialise -flate-dmd-anal -fstg-lift-lams

library cexpr-runtime
  exposed-modules:
      C.Expr.HostPlatform
      C.Expr.Posix32
      C.Expr.Posix64
      C.Expr.Win64
      C.Operator.Classes
      C.Operator.GenInstances
      C.Operator.Internal
      C.Operator.TH
      C.Operators
      C.Type
      C.Type.Internal.Universe
  other-modules:
      Paths_mpv_bindgen_sys
  autogen-modules:
      Paths_mpv_bindgen_sys
  hs-source-dirs:
      runtime-cexpr
  default-extensions:
      DataKinds
      DeriveGeneric
      DeriveTraversable
      DerivingStrategies
      FlexibleInstances
      GADTs
      ImportQualifiedPost
      LambdaCase
      MagicHash
      MultiParamTypeClasses
      ParallelListComp
      StandaloneKindSignatures
      TupleSections
      TypeApplications
      TypeFamilies
      TypeOperators
  build-depends:
      base >=4.17 && <4.23
    , containers >=0.5 && <0.9
    , fin >=0.3.2 && <0.4
    , some >=1.0.6 && <1.1
    , template-haskell >=2.18 && <2.25
    , vec ==0.5.*
  default-language: Haskell2010
  if flag(optimize)
    ghc-options: -O2
  if flag(optimize-aggressively)
    ghc-options: -O2 -fexpose-all-unfoldings -flate-specialise -flate-dmd-anal -fstg-lift-lams