@@ -96,7 +96,7 @@ parsePath p = case Store.parsePath "/nix/store" (Text.encodeUtf8 p) of
9696writeDerivation :: (Framed e m , MonadStore m ) => Derivation -> m Store. StorePath
9797writeDerivation drv@ Derivation {inputs, name} = do
9898 let (inputSrcs, inputDrvs) = inputs
99- references <- fmap Set. fromList $ mapM parsePath $ Set. toList $ Set. union inputSrcs $ Set. fromList $ Map. keys inputDrvs
99+ references <- fmap Set. fromList $ traverse parsePath $ Set. toList $ Set. union inputSrcs $ Set. fromList $ Map. keys inputDrvs
100100 path <- addTextToStore (Text. append name " .drv" ) (unparseDrv drv) (S. fromList $ Set. toList references) False
101101 parsePath $ Text. pack $ unStorePath path
102102
@@ -300,12 +300,12 @@ buildDerivationWithContext drvAttrs = do
300300 useJson <- getAttrOr " __structuredAttrs" False $ pure
301301 ignoreNulls <- getAttrOr " __ignoreNulls" False $ pure
302302
303- args <- getAttrOr " args" mempty $ mapM (fromValue' >=> extractNixString)
303+ args <- getAttrOr " args" mempty $ traverse (fromValue' >=> extractNixString)
304304 builder <- getAttr " builder" $ extractNixString
305305 platform <- getAttr " system" $ extractNoCtx >=> assertNonNull
306306 mHash <- getAttrOr " outputHash" mempty $ extractNoCtx >=> (pure . pure )
307307 hashMode <- getAttrOr " outputHashMode" Flat $ extractNoCtx >=> parseHashMode
308- outputs <- getAttrOr " outputs" [" out" ] $ mapM (fromValue' >=> extractNoCtx)
308+ outputs <- getAttrOr " outputs" [" out" ] $ traverse (fromValue' >=> extractNoCtx)
309309
310310 mFixedOutput <-
311311 maybe
@@ -333,7 +333,7 @@ buildDerivationWithContext drvAttrs = do
333333 rawString :: Text <- extractNixString jsonString
334334 pure $ Map. singleton " __json" rawString
335335 else
336- mapM (lift . coerceToString callFunc CopyToStore CoerceAny >=> extractNixString) $
336+ traverse (lift . coerceToString callFunc CopyToStore CoerceAny >=> extractNixString) $
337337 Map. fromList $ M. toList $ deleteKeys [ " args" , " __ignoreNulls" ] attrs
338338
339339 pure $ defaultDerivation { platform, builder, args, env, hashMode, useJson
0 commit comments