         var pkgConfigCandidates: Set<String> = []
         #if os(macOS)
             // Determine the dependency graph of `pkg-config` and add them all to the candidate set.
-            for package in (prerequisites?.map(\.pkgConfig) ?? []) + [pkgConfig] {
+            for package in (prerequisites?.map({$0.pkgConfig ?? $0.girName.lowercased()}) ?? []) + [pkgConfig] {
                 pkgConfigCandidates.formUnion(try getAllPkgConfigDependencies(for: package))
             }
         #endif

        case version
        case girName = "gir-name"
        case pkgConfig = "pkg-config"
        case prerequisites
    }

    /// The version of manifest. It is not utilized now, but I want to keep the property there for future purposes.
    let version: UInt
    
    /// The name of the gir file associated with the manifest. Extension is NOT expected.
    let girName: String
    
    /// The name of pkg-config package in which the gir file resides (mainly for the purposes of macOS sandboxing)
    let pkgConfig: String
    
    /// Optional list of `.gir` prerequisites
    let prerequisites: [Prerequisite]?
}

/// Description of a `.gir` prerequisity
struct Prerequisite: Codable {
    private enum CodingKeys: String, CodingKey {
        case girName = "gir-name"

    let girName: String

    /// The name of pkg-config package in which the gir file resides (mainly for the purposes of macOS sandboxing)
    /// If this is `nil`, then the lowercase version of the gir name will be used.
    let pkgConfig: String?
}

/// Metadata parsed from a `.gir` file. This structure is intended to help in determining the dependency graph of `.gir` files. It represents the contents of `/gir:repository`
