cabal-debian-4.26: Create a Debianization for a Cabal package

Safe HaskellNone




The basic information required to load a Cabal or Debian package description.



data Flags Source

This record supplies enough information to locate and load a debianization or a cabal file from the IO monad.




_verbosity :: Int

Run with progress messages at the given level of verboseness.

_dryRun :: Bool

Don't write any files or create any directories, just explain what would have been done.

_validate :: Bool

Fail if the debianization already present doesn't match the one we are going to generate closely enough that it is safe to debianize during the run of dpkg-buildpackage, when Setup configure is run. Specifically, the version number in the top changelog entry must match, and the sets of package names in the control file must match.

_debAction :: DebAction

What to do - Usage, Debianize or Substvar

_compilerFlavor :: CompilerFlavor

Which compiler should we generate library packages for? In theory a single deb could handle multiple compiler flavors, but the support tools are not ready for this as of right now (28 Jan 2015.)

_cabalFlagAssignments :: Set (FlagName, Bool)

Flags to pass to Cabal function finalizePackageDescription, this can be used to control the flags in the cabal file. It can be supplied to the cabal-debian binary using the --flags option.

_buildEnv :: EnvSet

Directory containing the build environment for which the debianization will be generated. This determines which compiler will be available, which in turn determines which basic libraries can be provided by the compiler. By default all the paths in EnvSet are "/".

data EnvSet Source




cleanOS :: FilePath

The output of the debootstrap command

dependOS :: FilePath

An environment with build dependencies installed

buildOS :: FilePath

An environment where we have built a package

data DebType Source

A redundant data type, too lazy to expunge.




State Monad

flagOptions :: MonadIO m => [OptDescr (StateT Flags m ())] Source

Command line options which build a function that modifies a state monad value of type Flags

newFlags :: IO Flags Source

Use flagOptions to build a new Flags value from the command line arguments in the environment.