From openhands-skills
Installs Swift on Debian 12 Linux by setting up dependencies, downloading tarball, extracting, and configuring PATH. Use for server-side Swift apps or Linux dev environments.
npx claudepluginhub openhands/extensionsThis skill uses the workspace's default tool permissions.
This document provides instructions for installing Swift on Debian 12 (Bookworm).
Safely modifies Xcode projects (.pbxproj) to add Swift Packages (e.g., Firebase, Alamofire) and link files for iOS dependency setup.
Scaffolds, builds, and packages SwiftPM-based macOS apps without Xcode. Covers from-scratch layouts, custom bundling, signing, notarization, and appcasts.
Checks Swift packages for WebAssembly compatibility, identifies incompatible frameworks like UIKit and SwiftUI, ports and refactors code using conditional compilation.
Share bugs, ideas, or general feedback.
This document provides instructions for installing Swift on Debian 12 (Bookworm).
This setup is intended for non-UI development tasks on Swift on Linux.
Before installing Swift, you need to install the required dependencies for your system. You can find the most up-to-date list of dependencies for your specific Linux distribution and version at the Swift.org tarball installation guide.
FOR EXAMPLE, the dependencies you may need to install for Debian 12 could be:
sudo apt-get update
sudo apt-get install -y \
binutils-gold \
gcc \
git \
libcurl4-openssl-dev \
libedit-dev \
libicu-dev \
libncurses-dev \
libpython3-dev \
libsqlite3-dev \
libxml2-dev \
pkg-config \
tzdata \
uuid-dev
Find the latest Swift version for Debian:
Go to the Swift.org download page to find the latest Swift version compatible with Debian 12 (Bookworm).
Look for a tarball named something like swift-<VERSION>-RELEASE-debian12.tar.gz (e.g., swift-6.0.3-RELEASE-debian12.tar.gz).
The URL pattern is typically:
https://download.swift.org/swift-<VERSION>-release/debian12/swift-<VERSION>-RELEASE/swift-<VERSION>-RELEASE-debian12.tar.gz
Where <VERSION> is the Swift version number (e.g., 6.0.3).
Download the Swift binary for Debian 12:
cd /workspace
wget https://download.swift.org/swift-6.0.3-release/debian12/swift-6.0.3-RELEASE/swift-6.0.3-RELEASE-debian12.tar.gz
Note: Make sure to install Swift in the
/workspacedirectory, but outside the git repository to avoid committing the Swift binaries.
~/.bashrc file:echo 'export PATH=/workspace/swift-6.0.3-RELEASE-debian12/usr/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Note: Make sure to update the version number in the PATH to match the version you downloaded.
Verify that Swift is correctly installed by running:
swift --version