Files
swift-inotify/Package.swift
T
T. R. Bernstein 442053eae2
Docs / docs (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
Move the event mask into a platform-neutral product
`InotifyEventMask` took its bits from the C header, so nothing that
imported it could build outside Linux. The new `InotifyMask` product
spells out the kernel constants instead; a Linux test compares each
of them with the header. `Inotify` re-exports the module, so
existing code is unaffected.
2026-09-14 00:13:19 +02:00

58 lines
1.7 KiB
Swift

// swift-tools-version: 6.0
import PackageDescription
let package = Package(
name: "Inotify",
platforms: [.macOS(.v13), .custom("Linux", versionString: "4.4.302")],
products: [
.library(
name: "Inotify",
targets: ["Inotify"]
),
.library(
name: "InotifyMask",
targets: ["InotifyMask"]
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.7.1"),
.package(url: "https://github.com/apple/swift-log", from: "1.10.1"),
.package(url: "https://github.com/apple/swift-nio", from: "2.95.0"),
.package(url: "https://github.com/apple/swift-system", from: "1.6.4"),
.package(url: "https://github.com/swiftlang/swift-subprocess.git", "0.3.0"..<"2.0.0"),
.package(url: "https://github.com/tuist/Noora", from: "0.55.1")
],
targets: [
.systemLibrary(name: "CInotify"),
.target(name: "InotifyMask"),
.target(
name: "Inotify",
dependencies: [
"CInotify",
"InotifyMask",
.product(name: "Logging", package: "swift-log"),
.product(name: "_NIOFileSystem", package: "swift-nio"),
.product(name: "SystemPackage", package: "swift-system")
]
),
.testTarget(
name: "InotifyIntegrationTests",
dependencies: [
"Inotify",
.product(name: "SystemPackage", package: "swift-system")
],
),
.executableTarget(
name: "InotifyTaskCLI",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "Logging", package: "swift-log"),
.product(name: "_NIOFileSystem", package: "swift-nio"),
.product(name: "Subprocess", package: "swift-subprocess"),
.product(name: "Noora", package: "Noora")
],
path: "Sources/TaskCLI"
)
]
)