 
 private struct TestDependency {
     let name: String
-    let requirement: String
-
-    fileprivate init(name: String, requirement: String) {
+    let requirement: Requirement
+    typealias Requirement = PackageDescription4.Package.Dependency.Requirement
+
+    fileprivate init(name: String, requirement: Requirement) {
         self.name = name
         self.requirement = requirement
+    }
+
+    func convert(baseURL: AbsolutePath) -> PackageDescription4.Package.Dependency {
+        return .package(url: baseURL.appending(component: name).asString, requirement)
     }
 }
 

                    package: .v4(.init(
                        name: package.name,
                        products: package.products.map({ .library(name: $0.name, targets: $0.targets) }),
                        dependencies: package.dependencies.map({
                            .package(url: packagesDir.appending(component: $0.name).asString, from: .init(stringLiteral: $0.requirement)) 
                        }),
                        targets: package.targets.map({ $0.convert() })
                    )),
                    version: v

                        TestProduct(name: "Foo", targets: ["Foo", "Bar"]),
                    ],
                    dependencies: [
                        TestDependency(name: "Baz", requirement: .upToNextMajor(from: "1.0.0")),
                    ]
                ),
            ],
