Merge pull request #280338 from shanesveller/shanesveller/rover-0.22

rover: 0.14.0 -> 0.22.0
This commit is contained in:
Mario Rodas
2024-01-28 08:00:23 -05:00
committed by GitHub
5 changed files with 4 additions and 2019 deletions
+4 -13
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
@@ -1 +0,0 @@
d35f8c48cb89329f33656944fa9e997de1e778b043b9ca4d78c8accdecfd9046
@@ -1 +0,0 @@
ff145f12604d11312e6a2f8a61a3d226fcdb2ca79f6b7fbc24c5a22aa23ab1af
File diff suppressed because it is too large Load Diff
-24
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