Merge pull request #226298 from bbigras/router

router: init at 1.14.0
This commit is contained in:
Sandro 2023-04-18 16:33:32 +02:00 committed by GitHub
commit 44d7ea55b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,46 @@
{ lib
, callPackage
, fetchFromGitHub
, rustPlatform
, pkg-config
, protobuf
, elfutils
}:
rustPlatform.buildRustPackage rec {
pname = "router";
version = "1.15.0";
src = fetchFromGitHub {
owner = "apollographql";
repo = pname;
rev = "v${version}";
sha256 = "sha256-TA0HE5zbSSPTq5Z/NP6/s1yqXyCicDmSAgqulmKbQeM=";
};
cargoSha256 = "sha256-binpEhtq5tQhSDD2mRKYMdwg9VZlBQZR3xZpOeZNYyY=";
nativeBuildInputs = [
pkg-config
protobuf
];
buildInputs = [
elfutils
];
# 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 = callPackage ./librusty_v8.nix { };
cargoTestFlags = [
"-- --skip=uplink::test::stream_from_uplink_error_no_retry"
];
meta = with lib; {
description = "A configurable, high-performance routing runtime for Apollo Federation";
homepage = "https://www.apollographql.com/docs/router/";
license = licenses.elastic;
maintainers = [ maintainers.bbigras ];
};
}

View file

@ -0,0 +1,20 @@
{ 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.60.1";
shas = {
x86_64-linux = "sha256-P8H+XJqrt9jdKM885L1epMldp+stwmEw+0Gtd2x3r4g=";
aarch64-linux = "sha256-frHpBP2pL3o4efFLHP2r3zsWJrNT93yYu2Qkxv+7m8Y=";
x86_64-darwin = "sha256-taewoYBkyikqWueLSD9dW1EDjzkV68Xplid1UaLZgRM=";
aarch64-darwin = "sha256-s2YEVbuYpiT/qrmE37aXk13MetrnJo6l+s1Q2y6b5kU=";
};
}

View file

@ -23438,6 +23438,8 @@ with pkgs;
ronn = callPackage ../development/tools/ronn { };
router = callPackage ../servers/http/router { };
rover = callPackage ../development/tools/rover { };
rqlite = callPackage ../servers/sql/rqlite { };