from: github.com/remko/age-plugin-se

This commit is contained in:
2023-03-09 22:52:40 +08:00
parent 57fac2893c
commit 71927745a8
22 changed files with 2720 additions and 2 deletions

36
Package.swift Normal file
View File

@@ -0,0 +1,36 @@
// swift-tools-version: 5.7
import PackageDescription
// Technically, the dependencies don't need the platform conditional.
// However, I like to keep the dependencies out of the build entirely on macOS.
// Unfortunately, this also means Package.resolved isn't stable.
var packageDependencies: [Package.Dependency] {
#if os(Linux) || os(Windows)
return [.package(url: "https://github.com/apple/swift-crypto.git", "2.0.0"..<"3.0.0")]
#else
return []
#endif
}
var targetDependencies: [Target.Dependency] {
#if os(Linux) || os(Windows)
return [
.product(
name: "Crypto", package: "swift-crypto", condition: .when(platforms: [.linux, .windows]))
]
#else
return []
#endif
}
let package = Package(
name: "AgeSecureEnclavePlugin",
platforms: [.macOS(.v13)],
dependencies: packageDependencies,
targets: [
.executableTarget(name: "age-plugin-se", dependencies: targetDependencies, path: "Sources"),
.testTarget(name: "Tests", dependencies: ["age-plugin-se"], path: "Tests"),
]
)