diff options
-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 |