router: init at 1.15.0

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Bruno Bigras 2023-04-15 11:11:31 -04:00
parent d029f889c0
commit 2f81686ec8
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

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