nvfetcher-0.6.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 HaskellSafe-Inferred
LanguageHaskell2010

NvFetcher.ExtractSrc

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
Generic ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep ExtractSrcQ :: Type -> Type #

Show 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 -> () #

Eq ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Ord ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Hashable ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Pretty ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Methods

pretty :: ExtractSrcQ -> Doc ann #

prettyList :: [ExtractSrcQ] -> Doc ann #

type Rep ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

type Rep ExtractSrcQ = D1 ('MetaData "ExtractSrcQ" "NvFetcher.Types" "nvfetcher-0.6.0.0-KFT0zAH5gJ45B8nlGxT9WZ" '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

Functions

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