portager-0.1.1.0: DSL for configuring Gentoo portage

Copyright(C) 2017 Jiri Marsicek
LicenseBSD-style (see the file LICENSE)
MaintainerJiri Marsicek <jiri.marsicek@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Portager.Writes

Description

This module provides functionality for serialization of portage configuration to configuration files.

Synopsis

Documentation

withAtom :: FlatPackage -> Text -> Text Source #

Adds Atom name as a prefix to text given as parameter.

toPackageUseRecord :: FlatPackage -> Maybe Text Source #

Creates a text record for package in a format required by package.use file.

toPackageUse :: [FlatPackage] -> [Text] Source #

Creates a list of records to be written to portage use file etcportagepackage.use* See toPackageUseRecord

toPackageAcceptKeywordRecord :: FlatPackage -> Maybe Text Source #

Creates a text record for a package in a format required by package.accept_keywords file.

toPackageAcceptKeywords :: [FlatPackage] -> [Text] Source #

Creates a list of lines to be written to portage accept_keywords file etcportagepackage.accept_keywords* See toPackageAcceptKeywordRecord

toPackageLicenseRecord :: FlatPackage -> Maybe Text Source #

Creates a text record for a package in a format required by package.license files.

toPackageLicense :: [FlatPackage] -> [Text] Source #

Creates a list of lines to be written to a portage license file etcportage/package.license See toPackageLicenseRecord

toPortageSet :: SetConfiguration -> [Text] Source #

Creates a collection of lines to be written to a portage set file etcportagesets*

writePortageSetFile :: FilePath -> FilePath -> [Text] -> ReaderT Options IO () Source #

Writes text lines to a file enclosed in directory, creating the directory if it does not exist. If there are no lines to be written, no action is performed. Parent of a directory is read from Options.

writePortageSetConfig :: Int -> PortageSetConfig -> ReaderT Options IO () Source #

Writes a PortageSetConfig with specified index to respective files. package.use file is prefixed with an index, since it is sensitive to order.

writePortageSetConfigs :: [WorldSet] -> [PortageSetConfig] -> ReaderT Options IO () Source #

Performs writePortageSetConfig for WorldSets given as parameter