yarn2nix-0.10.1: Convert yarn.lock files to nix expressions
Safe HaskellNone
LanguageHaskell2010

Distribution.Nixpkgs.Nodejs.ResolveLockfile

Description

Resolving a Lockfile and generating all necessary data (e.g. hashes), so that it can be converted to a nix expression. Might need IO & network access to succeed.

Synopsis

Documentation

resolveLockfileStatus :: ResolverConfig -> Chan Remote -> Lockfile -> IO (Either (NonEmpty Text) ResolvedLockfile) Source #

Resolve all packages by downloading their sources if necessary.

Respects runOffline from RunConfig: If it is True, it throws an error as soon as it would need to download something which is the case for GitRemote.

data ResolverConfig Source #

Constructors

ResolverConfig 

Fields

data Resolved a Source #

A thing whose hash is already known (“resolved”).

Only packages with known hashes are truly “locked”.

Constructors

Resolved 

Fields

Instances

Instances details
Functor Resolved Source # 
Instance details

Defined in Distribution.Nixpkgs.Nodejs.ResolveLockfile

Methods

fmap :: (a -> b) -> Resolved a -> Resolved b #

(<$) :: a -> Resolved b -> Resolved a #

Eq a => Eq (Resolved a) Source # 
Instance details

Defined in Distribution.Nixpkgs.Nodejs.ResolveLockfile

Methods

(==) :: Resolved a -> Resolved a -> Bool #

(/=) :: Resolved a -> Resolved a -> Bool #

Show a => Show (Resolved a) Source # 
Instance details

Defined in Distribution.Nixpkgs.Nodejs.ResolveLockfile

Methods

showsPrec :: Int -> Resolved a -> ShowS #

show :: Resolved a -> String #

showList :: [Resolved a] -> ShowS #

type ResolvedLockfile = MKMap PackageKey (Resolved Package) Source #

In order to write a nix file, all packages need to know their shasums first.