niv-0.2.0: Easy dependency management for Nix projects

Safe HaskellNone
LanguageHaskell2010

Niv.Cli

Synopsis

Documentation

cli :: IO () Source #

newtype Sources Source #

Instances
ToJSON Sources Source # 
Instance details

Defined in Niv.Cli

FromJSON Sources Source # 
Instance details

Defined in Niv.Cli

attrsToSpec :: Attrs -> PackageSpec Source #

Simply discards the Freedom

partitionEithersHMS :: (Eq k, Hashable k) => HashMap k (Either a b) -> (HashMap k a, HashMap k b) Source #

decodeFileStrict :: FromJSON a => FilePath -> IO (Maybe a) Source #

Efficiently deserialize a JSON value from a file. If this fails due to incomplete or invalid input, Nothing is returned.

The input file's content must consist solely of a JSON document, with no trailing data except for whitespace.

This function parses immediately, but defers conversion. See json for details.

encodeFile :: ToJSON a => FilePath -> a -> IO () Source #

Efficiently serialize a JSON value as a lazy ByteString and write it to a file.

forWithKeyM :: (Eq k, Hashable k, Monad m) => HashMap k v1 -> (k -> v1 -> m v2) -> m (HashMap k v2) Source #

forWithKeyM_ :: (Eq k, Hashable k, Monad m) => HashMap k v1 -> (k -> v1 -> m ()) -> m () Source #

mapWithKeyM :: (Eq k, Hashable k, Monad m) => (k -> v1 -> m v2) -> HashMap k v1 -> m (HashMap k v2) Source #

mapWithKeyM_ :: (Eq k, Hashable k, Monad m) => (k -> v1 -> m ()) -> HashMap k v1 -> m () Source #

shouldUpdateNixSourcesNix :: ByteString -> Bool Source #

Checks if content is different than default and if it does not contain a comment line with niv: no_update

initNixSourcesNixContent :: ByteString Source #

Glue code between nix and sources.json

pathNixSourcesJson :: FilePath Source #

@nix/sources.json"