{"id":17116154,"url":"https://github.com/dduan/nixswiftpm","last_synced_at":"2025-10-07T00:43:19.418Z","repository":{"id":66950650,"uuid":"453627813","full_name":"dduan/nixSwiftPM","owner":"dduan","description":"Nix helper for SwiftPM","archived":false,"fork":false,"pushed_at":"2022-01-30T08:40:00.000Z","size":2,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-06T22:40:25.433Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dduan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-01-30T08:37:51.000Z","updated_at":"2022-01-31T01:22:23.000Z","dependencies_parsed_at":"2023-03-14T07:00:48.583Z","dependency_job_id":null,"html_url":"https://github.com/dduan/nixSwiftPM","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dduan/nixSwiftPM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dduan%2FnixSwiftPM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dduan%2FnixSwiftPM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dduan%2FnixSwiftPM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dduan%2FnixSwiftPM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dduan","download_url":"https://codeload.github.com/dduan/nixSwiftPM/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dduan%2FnixSwiftPM/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278703578,"owners_count":26031204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T17:48:01.584Z","updated_at":"2025-10-07T00:43:19.398Z","avatar_url":"https://github.com/dduan.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nixSwiftPM\n\nA helper for building SwiftPM projects in Nix.\n\nFor now, it builds only executable product defined in Package.swift. An example:\n\n```nix\n{ pkgs ? import \u003cnixpkgs\u003e { } }:\nlet\n  nixSwiftPM = import ./nixSwiftPM.nix { };\nin nixSwiftPM.buildExecutableProduct {\n  src = ./.;\n  productName = \"awesome-cli\"; # product name as defined in Package.swift\n  executableName = \"awesome\";  # Rename the final output\n}\n```\n\n## FAQ\n\n### Why not just run `swift build`?\n\nIn its current state, `nixSwiftPM` takes care of downloading source dependencies for SwiftPM according to its\nPackage.resolved. Each dependency is downloaded and unpacked as a Nix derivation. This way, we take advantage\nof Nix's caching mechanism, leading us one step closer to hermetic build output.\n\n### Does that mean Package.resolved must be present?\n\nYes.\n\n### What's the build setting?\n\nBy default, the target is built in release configuration. You can change that to `debug` with the\n`buildConfig` argument. Additional arguments for `swift build` can be passed by `additionalFlags`.\n\n### What if I need more build time or runtime dependencies?\n\nYou can pass in additional `nativeBuildInputs` and/or `buildInputs` in the argument set.\n\n### How about the final output?\n\nBy default, the built executable is placed in `$out/bin/`. You may completely override the `installPhase` as\nyou see fit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdduan%2Fnixswiftpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdduan%2Fnixswiftpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdduan%2Fnixswiftpm/lists"}