From 5c596286a67b572f04863b0ab70197335dfb70e6 Mon Sep 17 00:00:00 2001 From: Mango The Fourth <40720523+MangoIV@users.noreply.github.com> Date: Mon, 3 Jun 2024 17:00:13 +0200 Subject: [PATCH] [feat] include meate.homepage for the purl (#4075) --- hack/bin/Sbom.hs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hack/bin/Sbom.hs b/hack/bin/Sbom.hs index 5f8ae69abf6..2944b188fb1 100644 --- a/hack/bin/Sbom.hs +++ b/hack/bin/Sbom.hs @@ -195,8 +195,9 @@ mkPurl meta = maybe "" ("@" <>) meta.version ] where + checks = meta.homepage : meta.urls repo - | any (maybe False (T.isInfixOf "hackage.haskell.org")) meta.urls = "hackage" + | any (maybe False (T.isInfixOf "hackage.haskell.org")) checks = "hackage" | otherwise = "nixpkgs" -- | serializes an SBom to JSON format @@ -209,11 +210,7 @@ serializeSBom settings bom = do -- FUTUREWORK(mangoiv): "tools" (the tools used in the creation of the bom) let mkDependencies :: SBomMeta Identity -> Array mkDependencies meta = - [ object - [ "ref" .= meta.outPath, - "dependsOn" .= runIdentity meta.directDeps - ] - ] + [object ["ref" .= meta.outPath, "dependsOn" .= runIdentity meta.directDeps]] serializeLicense :: Maybe License -> Maybe Value serializeLicense ml = do