nvfetcher-0.5.0.0: Generate nix sources expr for the latest version of packages
Copyright(c) 2021-2022 berberman
LicenseMIT
Maintainerberberman <berberman@yandex.com>
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 :: Config -> Map PackageKey Package -> Map PackageKey Version -> IO ShakeExtras Source #

Create an empty ShakeExtras from packages to build, times to retry for each rule, build dir, and on disk versions

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

Retry

withRetry :: Action a -> Action a Source #

Run an action, retry at most retry times (defined in config) if it throws an exception

Build dir

Last versions

getLastVersionOnDisk :: PackageKey -> Action (Maybe Version) Source #

Get initial version of a package

getRecentLastVersion :: PackageKey -> Action (Maybe Version) Source #

Get version of a package, no matter it was initial one or rule result

updateLastVersion :: PackageKey -> Version -> Action () Source #

Add nvchecker result of a package

getLastVersionUpdated :: PackageKey -> Action (Maybe Version) Source #

Get updated version of a package

Cache nvchecker