diff options
author | Stéphan Kochen <git@stephank.nl> | 2023-04-20 14:13:22 +0200 |
---|---|---|
committer | Stéphan Kochen <git@stephank.nl> | 2023-04-30 15:03:19 +0200 |
commit | 88be91f08c8fcf6a5912b83dea31fcee090e0dab (patch) | |
tree | 9bf30629679ea21f0ced24457d913e8e10cc6de9 /pkgs/development | |
parent | c96a05a29339df5230385f0cfb9ee0c9a4a29017 (diff) |
swiftpm2nix: add support for workspace-state v6
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/tools/swiftpm2nix/support.nix | 2 | ||||
-rwxr-xr-x | pkgs/development/tools/swiftpm2nix/swiftpm2nix.sh | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/development/tools/swiftpm2nix/support.nix b/pkgs/development/tools/swiftpm2nix/support.nix index 94076517ebfcf..3c8e597f25eaf 100644 --- a/pkgs/development/tools/swiftpm2nix/support.nix +++ b/pkgs/development/tools/swiftpm2nix/support.nix @@ -6,7 +6,7 @@ in rec { # Derive a pin file from workspace state. mkPinFile = workspaceState: - assert workspaceState.version == 5; + assert workspaceState.version >= 5 && workspaceState.version <= 6; json.generate "Package.resolved" { version = 1; object.pins = map (dep: { diff --git a/pkgs/development/tools/swiftpm2nix/swiftpm2nix.sh b/pkgs/development/tools/swiftpm2nix/swiftpm2nix.sh index 72051b4e448df..db00b1ad2b527 100755 --- a/pkgs/development/tools/swiftpm2nix/swiftpm2nix.sh +++ b/pkgs/development/tools/swiftpm2nix/swiftpm2nix.sh @@ -12,7 +12,8 @@ if [[ ! -f "$stateFile" ]]; then exit 1 fi -if [[ "$(jq .version $stateFile)" != "5" ]]; then +stateVersion="$(jq .version $stateFile)" +if [[ $stateVersion -lt 5 || $stateVersion -gt 6 ]]; then echo >&2 "Unsupported $stateFile version" exit 1 fi |