@@ -126,18 +126,17 @@ redirectedUrls log Args {..} = do
126126--------------------------------------------------------------------------------
127127-- Rewrite Rust on rustPlatform.buildRustPackage
128128-- This is basically `version` above, but with a second pass to also update the
129- -- cargoSha256 vendor hash.
129+ -- cargoHash vendor hash.
130130rustCrateVersion :: MonadIO m => (Text -> m () ) -> Args -> ExceptT Text m (Maybe Text )
131131rustCrateVersion log args@ Args {.. } = do
132132 if
133- | and [ (not (T. isInfixOf " cargoSha256 " derivationContents)), ( not ( T. isInfixOf " cargoHash" derivationContents))] -> do
134- lift $ log " No cargoSha256 or cargoHash found"
133+ | (not (T. isInfixOf " cargoHash" derivationContents)) -> do
134+ lift $ log " No cargoHash found"
135135 return Nothing
136136 | hasUpdateScript -> do
137137 lift $ log " skipping because derivation has updateScript"
138138 return Nothing
139139 | otherwise -> do
140- _ <- lift $ File. replaceIO " cargoSha256 =" " cargoHash =" derivationFile
141140 -- This starts the same way `version` does, minus the assert
142141 srcVersionFix args
143142 -- But then from there we need to do this a second time for the cargoHash!
@@ -160,14 +159,13 @@ rustCrateVersion log args@Args {..} = do
160159golangModuleVersion :: MonadIO m => (Text -> m () ) -> Args -> ExceptT Text m (Maybe Text )
161160golangModuleVersion log args@ Args {.. } = do
162161 if
163- | and [ not (T. isInfixOf " buildGoModule " derivationContents && T. isInfixOf " vendorSha256 " derivationContents), not ( T. isInfixOf " buildGoModule " derivationContents && T. isInfixOf " vendorHash" derivationContents)] -> do
164- lift $ log " Not a buildGoModule package with vendorSha256 or vendorHash"
162+ | not (T. isInfixOf " buildGo " derivationContents && T. isInfixOf " vendorHash" derivationContents) -> do
163+ lift $ log " Not a buildGoModule package with vendorHash"
165164 return Nothing
166165 | hasUpdateScript -> do
167166 lift $ log " skipping because derivation has updateScript"
168167 return Nothing
169168 | otherwise -> do
170- _ <- lift $ File. replaceIO " vendorSha256 =" " vendorHash =" derivationFile
171169 -- This starts the same way `version` does, minus the assert
172170 srcVersionFix args
173171 -- But then from there we need to do this a second time for the vendorHash!
@@ -197,7 +195,7 @@ golangModuleVersion log args@Args {..} = do
197195--------------------------------------------------------------------------------
198196-- Rewrite NPM packages with buildNpmPackage
199197-- This is basically `version` above, but with a second pass to also update the
200- -- cargoSha256 vendor hash.
198+ -- npmDepsHash vendor hash.
201199npmDepsVersion :: MonadIO m => (Text -> m () ) -> Args -> ExceptT Text m (Maybe Text )
202200npmDepsVersion log args@ Args {.. } = do
203201 if
0 commit comments