Copyright | (c) 2021 berberman |
---|---|
License | MIT |
Maintainer | berberman <berberman@yandex.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
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 = defaultMain 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 build
main build
-- build nix sources expr from givenpackageSet
main clean
-- delete .shake dir and generated nix filemain -j
-- build with parallelism
All shake options are inherited.
Synopsis
- data Args = Args {
- argShakeOptions :: ShakeOptions -> ShakeOptions
- argOutputFilePath :: FilePath
- argRules :: Rules ()
- argActionAfterBuild :: Action ()
- argActionAfterClean :: Action ()
- defaultArgs :: Args
- runNvFetcher :: Args -> PackageSet () -> IO ()
- runNvFetcherWith :: [OptDescr (Either String a)] -> ([a] -> IO (Maybe (Args, PackageSet ()))) -> IO ()
- module NvFetcher.PackageSet
- module NvFetcher.Types
- module NvFetcher.ShakeExtras
Documentation
Arguments for running nvfetcher
Args | |
|
defaultArgs :: Args Source #
Default arguments of defaultMain
Output file path is sources.nix
.
runNvFetcher :: Args -> PackageSet () -> IO () Source #
Entry point of nvfetcher
:: [OptDescr (Either String a)] | Custom flags |
-> ([a] -> IO (Maybe (Args, PackageSet ()))) | Continuation, the build system won't run if it returns Nothing |
-> IO () |
Like runNvFetcher
but allows to define custom cli flags
module NvFetcher.PackageSet
module NvFetcher.Types
module NvFetcher.ShakeExtras