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.ExtractSrc

Contents

Description

This module provides function that extracs files contents from package sources. It uses IFD under the hood, pulling textual files from source drv. Because we use nix-instantiate to build drv, so nixpkgs (NIX_PATH) is required.

Synopsis

Types

data ExtractSrcQ Source #

Extract file contents from package source e.g. Cargo.lock

Instances

Instances details
Eq ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Ord ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Show ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Generic ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep ExtractSrcQ :: Type -> Type #

Hashable ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Binary ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

NFData ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: ExtractSrcQ -> () #

ToNixExpr ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.NixExpr

type Rep ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

type Rep ExtractSrcQ = D1 ('MetaData "ExtractSrcQ" "NvFetcher.Types" "nvfetcher-0.4.0.0-2zPYeAZ7I3cC6vD5RskllZ" 'False) (C1 ('MetaCons "ExtractSrcQ" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NixFetcher 'Fetched)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty FilePath))))
type RuleResult ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Rules

extractSrcRule :: Rules () Source #

Rules of extract source

extractSrc Source #

Arguments

:: NixFetcher Fetched

prefetched source

-> FilePath

relative file path to extract

-> Action (HashMap FilePath Text) 

Run extract source

extractSrcs Source #

Arguments

:: NixFetcher Fetched

prefetched source

-> NonEmpty FilePath

relative file paths to extract

-> Action (HashMap FilePath Text) 

Run extract source with many sources