nvfetcher-0.4.0.0: Generate nix sources expr for the latest version of packages
Copyright(c) 2021 berberman
LicenseMIT
Maintainerberberman <[email protected]>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

NvFetcher.Types.ShakeExtras

Description

This module is about global information we use in rules.

Synopsis

Types

data ShakeExtras Source #

Values we use during the build. It's stored in shakeExtra

initShakeExtras :: Map PackageKey Package -> Int -> IO ShakeExtras Source #

Create an empty ShakeExtras from packages to build and times to retry for each rule

getShakeExtras :: Action ShakeExtras Source #

Get our values from shake

Packages

lookupPackage :: PackageKey -> Action (Maybe Package) Source #

Find a package given its key

getAllPackageKeys :: Action [PackageKey] Source #

Get keys of all packages to build

isPackageKeyTarget :: PackageKey -> Action Bool Source #

Check if we need build this package

Version changes

recordVersionChange :: PackageName -> Maybe Version -> Version -> Action () Source #

Record version change of a package

getVersionChanges :: Action [VersionChange] Source #

Get version changes since the last run

Retries

withRetries :: Action a -> Action a Source #

Run an action, retry at most retries times if it throws an exception