@@ -112,7 +112,7 @@ instance Pretty Derivation where
112 , nest 2 $ vcat
112 , nest 2 $ vcat
113 [ attr "pname" $ doubleQuotes $ disp (packageName _pkgid)
113 [ attr "pname" $ doubleQuotes $ disp (packageName _pkgid)
114 , attr "version" $ doubleQuotes $ disp (packageVersion _pkgid)
114 , attr "version" $ doubleQuotes $ disp (packageVersion _pkgid)
115− , sourceAttr _src
115+ , pPrint _src
116 , onlyIf (_subpath /= ".") $ attr "postUnpack" postUnpack
116 , onlyIf (_subpath /= ".") $ attr "postUnpack" postUnpack
117 , onlyIf (_revision > 0) $ attr "revision" $ doubleQuotes $ int _revision
117 , onlyIf (_revision > 0) $ attr "revision" $ doubleQuotes $ int _revision
118 , onlyIf (not (null _editedCabalFile) && _revision > 0) $ attr "editedCabalFile" $ string _editedCabalFile
118 , onlyIf (not (null _editedCabalFile) && _revision > 0) $ attr "editedCabalFile" $ string _editedCabalFile
@@ -148,17 +148,5 @@ instance Pretty Derivation where
148 renderedFlags = [ text "-f" <> (if enable then empty else char '-') <> text (unFlagName f) | (f, enable) <- unFlagAssignment _cabalFlags ]
148 renderedFlags = [ text "-f" <> (if enable then empty else char '-') <> text (unFlagName f) | (f, enable) <- unFlagAssignment _cabalFlags ]
149 ++ map text (toAscList _configureFlags)
149 ++ map text (toAscList _configureFlags)
150 isHackagePackage = "mirror://hackage/" `isPrefixOf` derivUrl _src
150 isHackagePackage = "mirror://hackage/" `isPrefixOf` derivUrl _src
151− sourceAttr DerivationSource {..}
152− | isHackagePackage = attr "sha256" $ string derivHash
153− | derivKind /= "" = vcat
154− [ text "src" <+> equals <+> text ("fetch" ++ derivKind) <+> lbrace
156− [ attr "url" $ string derivUrl
157− , attr "sha256" $ string derivHash
158− , if derivRevision /= "" then attr "rev" (string derivRevision) else empty
162− | otherwise = attr "src" $ text derivUrl
164 postUnpack = string $ "sourceRoot+=/" ++ _subpath ++ "; echo source root reset to $sourceRoot"
152 postUnpack = string $ "sourceRoot+=/" ++ _subpath ++ "; echo source root reset to $sourceRoot"