rover: 0.14.0 -> 0.22.0

https://github.com/apollographql/rover/blob/v0.22.0/CHANGELOG.md#0220---2023-12-13

There are self-reported breaking changes in the following intermediate
versions:
- 0.16.0
- 0.17.1
- 0.18.0
This commit is contained in:
Shane Sveller 2024-01-11 13:39:04 -06:00 committed by Shane Sveller
parent bfc3865336
commit 40a1952c78
No known key found for this signature in database
5 changed files with 4 additions and 2019 deletions

View File

@ -1,5 +1,4 @@
{ lib
, callPackage
, fetchFromGitHub
, perl
, rustPlatform
@ -9,20 +8,21 @@
rustPlatform.buildRustPackage rec {
pname = "rover";
version = "0.14.0";
version = "0.22.0";
src = fetchFromGitHub {
owner = "apollographql";
repo = pname;
rev = "v${version}";
sha256 = "sha256-fVgo5Ds/VK0kBpF+F2FdMvBnQj2IB+B5ToOK8ONdq6c=";
sha256 = "sha256-+BsD7SRinU57Alg71N3tdL9iFGGdomVA7SrBE6G1f4E=";
};
cargoSha256 = "sha256-fNqnpLNENLJEhbqxLFUqyjAf8tEPCLoGSRV91gOY9LI=";
cargoSha256 = "sha256-SDvOxvfv8FNUebfwSFnBc6ormK2xpXPjmACwtllHfQE=";
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.CoreServices
darwin.apple_sdk.frameworks.SystemConfiguration
];
nativeBuildInputs = [
@ -36,15 +36,6 @@ rustPlatform.buildRustPackage rec {
"-- --skip=latest_plugins_are_valid_versions"
];
# The rover-client's build script (xtask/src/commands/prep/schema.rs) will try to
# download the API's graphql schema at build time to our read-only filesystem.
# To avoid this we pre-download it to a location the build script checks.
preBuild = ''
cp ${./schema}/hash.id crates/rover-client/.schema/
cp ${./schema}/etag.id crates/rover-client/.schema/
cp ${./schema}/schema.graphql crates/rover-client/.schema/
'';
passthru.updateScript = ./update.sh;
# Some tests try to write configuration data to a location in the user's home

View File

@ -1 +0,0 @@
d35f8c48cb89329f33656944fa9e997de1e778b043b9ca4d78c8accdecfd9046

View File

@ -1 +0,0 @@
ff145f12604d11312e6a2f8a61a3d226fcdb2ca79f6b7fbc24c5a22aa23ab1af

File diff suppressed because it is too large Load Diff

View File

@ -49,27 +49,3 @@ cargoSha256=$(
sed --in-place \
"s|cargoSha256 = \".*\"|cargoSha256 = \"$cargoSha256\"|" \
"$dirname/default.nix"
# Update apollo api schema info
response="$(mktemp)"
schemaUrl=https://graphql.api.apollographql.com/api/schema
mkdir -p "$dirname"/schema
# Fetch schema info
echo "Fetching Apollo GraphQL schema"
# include response headers, and append terminating newline to response body
curl --include --write-out "\n" "$schemaUrl" > "$response"
# Parse response headers and write the etag to schema/etag.id
grep \
--max-count=1 \
--only-matching \
--perl-regexp \
'^etag: \K\S*' \
"$response" \
> "$dirname"/schema/etag.id
# Discard headers and blank line (terminated by carriage return), and write the
# response body to schema/schema.graphql
sed '1,/^\r/d' "$response" > "$dirname"/schema/schema.graphql