rover: 0.4.8 -> 0.5.1

Note that the librusty_v8 dependency was removed in
3e4781d3c4
main
ivanbrennan 2 years ago
parent 1ffba9f2f6
commit 1bb806a081
No known key found for this signature in database
GPG Key ID: 79C3C47DC652EA54
  1. 12
      pkgs/development/tools/rover/default.nix
  2. 17
      pkgs/development/tools/rover/librusty_v8.nix
  3. 2
      pkgs/development/tools/rover/schema/etag.id
  4. 44
      pkgs/development/tools/rover/schema/schema.graphql
  5. 21
      pkgs/development/tools/rover/update.sh

@ -3,26 +3,20 @@
, fetchFromGitHub
, perl
, rustPlatform
, librusty_v8 ? callPackage ./librusty_v8.nix { }
}:
rustPlatform.buildRustPackage rec {
pname = "rover";
version = "0.4.8";
version = "0.5.1";
src = fetchFromGitHub {
owner = "apollographql";
repo = pname;
rev = "v${version}";
sha256 = "sha256-9o2bGa9vxN7EprKgsy9TI7AFmwjo1OT1pDyiLierTq0=";
sha256 = "sha256-wBHMND/xpm9o7pkWMUj9lEtEkzy3mX+E4Dt7qDn6auY=";
};
cargoSha256 = "sha256-4oNuyZ1xNK2jP9QFEcthCjEQRyvFykd5N0j5KCXrzVY=";
# The v8 package will try to download a `librusty_v8.a` release at build time
# to our read-only filesystem. To avoid this we pre-download the file and
# export it via RUSTY_V8_ARCHIVE
RUSTY_V8_ARCHIVE = librusty_v8;
cargoSha256 = "sha256-n0R2MdAYGsOsYt4x1N1KdGvBZYTALyhSzCGW29bnFU4=";
nativeBuildInputs = [
perl

@ -1,17 +0,0 @@
{ rust, stdenv, fetchurl }:
let
arch = rust.toRustTarget stdenv.hostPlatform;
fetch_librusty_v8 = args: fetchurl {
name = "librusty_v8-${args.version}";
url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${arch}.a";
sha256 = args.shas.${stdenv.hostPlatform.system};
meta = { inherit (args) version; };
};
in
fetch_librusty_v8 {
version = "0.38.1";
shas = {
x86_64-linux = "sha256-vRkb5ZrIOYSKa84UbsJD+Oua0wve7f1Yf3kMg/kkYSY=";
};
}

@ -1 +1 @@
1bdcf8916afc3cea660add457724dddd70154904f4e360e15da27fa7d5c43cd0
2694c7b893d44c9ad8f5d7161116deb9985a6bd05e8e0cdcd7379947430e6f89

File diff suppressed because one or more lines are too long

@ -26,17 +26,6 @@ rover_tar_url="https://github.com/apollographql/rover/archive/refs/tags/${rover_
# Convert hash to SRI representation
rover_sri_hash=$(nix hash to-sri --type sha256 "$rover_hash")
# Identify librusty version and hash
librusty_version=$(
sed --quiet '/^name = "v8"$/{n;p}' "${repo}/Cargo.lock" \
| grep --only-matching --perl-regexp '^version = "\K[^"]+'
)
librusty_arch=x86_64-unknown-linux-gnu
librusty_url="https://github.com/denoland/rusty_v8/releases/download/v${librusty_version}/librusty_v8_release_${librusty_arch}.a"
echo "Fetching librusty"
librusty_hash=$(nix-prefetch-url "$librusty_url" --type sha256)
librusty_sri_hash=$(nix hash to-sri --type sha256 "$librusty_hash")
# Update rover version.
sed --in-place \
"s|version = \"[0-9.]*\"|version = \"$rover_version\"|" \
@ -61,16 +50,6 @@ sed --in-place \
"s|cargoSha256 = \".*\"|cargoSha256 = \"$cargoSha256\"|" \
"$dirname/default.nix"
# Update librusty version
sed --in-place \
"s|version = \"[0-9.]*\"|version = \"$librusty_version\"|" \
"$dirname/librusty_v8.nix"
# Update librusty hash
sed --in-place \
"s|x86_64-linux = \"[^\"]*\"|x86_64-linux = \"$librusty_sri_hash\"|" \
"$dirname/librusty_v8.nix"
# Update apollo api schema info
response="$(mktemp)"
schemaUrl=https://graphql.api.apollographql.com/api/schema

Loading…
Cancel
Save