| Copyright | (c) 2021 berberman |
|---|---|
| License | MIT |
| Maintainer | berberman <berberman@yandex.com> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
NvFetcher
Description
The main module of nvfetcher. If you want to create CLI program with it, it's enough to import only this module.
Example:
module Main where import NvFetcher main :: IO () main = runNvFetcher defaultArgs packageSet packageSet :: PackageSet () packageSet = do define $ package "feeluown-core"fromPypi"feeluown" define $ package "qliveplayer"fromGitHub(IsoaSFlus, QLivePlayer)
You can find more examples of packages in Main_example.hs.
Running the created program:
main-- abbreviation ofmain buildmain build-- build nix sources expr from givenpackageSetmain clean-- delete .shake dir and generated nix filemain -j-- build with parallelism
All shake options are inherited.
Synopsis
- data Args = Args {
- argShakeOptions :: ShakeOptions
- argTarget :: String
- argOutputFilePath :: FilePath
- argRules :: Rules ()
- argActionAfterBuild :: Action ()
- argActionAfterClean :: Action ()
- argRetries :: Int
- defaultArgs :: Args
- runNvFetcher :: PackageSet () -> IO ()
- runNvFetcherNoCLI :: Args -> PackageSet () -> IO ()
- cliOptionsToArgs :: CLIOptions -> Args
- module NvFetcher.PackageSet
- module NvFetcher.Types
- module NvFetcher.Types.ShakeExtras
Documentation
Arguments for running nvfetcher
Constructors
| Args | |
Fields
| |
defaultArgs :: Args Source #
Default arguments of defaultMain
Output file path is sources.nix.
runNvFetcher :: PackageSet () -> IO () Source #
Run nvfetcher with CLI options
This function calls runNvFetcherNoCLI, using Args from CLIOptions.
Use this function to create your own Haskell executable program.
runNvFetcherNoCLI :: Args -> PackageSet () -> IO () Source #
Entry point of nvfetcher
cliOptionsToArgs :: CLIOptions -> Args Source #
Apply CLIOptions to defaultArgs
module NvFetcher.PackageSet
module NvFetcher.Types
module NvFetcher.Types.ShakeExtras