Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samasaur1/nix-swift-hello
https://github.com/samasaur1/nix-swift-hello
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/samasaur1/nix-swift-hello
- Owner: Samasaur1
- Created: 2024-04-19T00:58:59.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-19T02:00:52.000Z (9 months ago)
- Last Synced: 2024-11-05T22:38:50.798Z (2 months ago)
- Language: Nix
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# An example Swift package, packaged with Nix.
This repository is designed to be a template for Nix-packaged Swift Package Manager projects.
### Adding Apple libraries:
Find apple libraries using `nix repl`:
```
$ nix repl
nix-repl> :lf nixpkgs
Added 15 variablesnix-repl> legacyPackages.aarch64-darwin.darwin.apple_sdk.frameworks.
```
and then add them to `buildInputs`:
```nix
buildInputs = [
darwin.apple_sdk.frameworks.Cocoa
darwin.apple_sdk.frameworks.SwiftUI
];
```### Adding SPM packages:
Edit `Package.swift` as normal, run `swift package resolve`, and then run `swiftpm2nix` from nixpkgs.