nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, callPackage
3, fetchFromGitHub
4, rustPlatform
5, pkg-config
6, protobuf
7, elfutils
8}:
9
10rustPlatform.buildRustPackage rec {
11 pname = "router";
12 version = "1.19.0";
13
14 src = fetchFromGitHub {
15 owner = "apollographql";
16 repo = pname;
17 rev = "v${version}";
18 sha256 = "sha256-IuS7NmlTNmHHnnSZ+YIbV6BnxJW2xprOQ5mkz5FuJEQ=";
19 };
20
21 cargoHash = "sha256-yeb+4lgRDssjkEx6bYfGIbn4DJGpZZ/JDmuwFjQ+U+8=";
22
23 nativeBuildInputs = [
24 pkg-config
25 protobuf
26 ];
27
28 buildInputs = [
29 elfutils
30 ];
31
32 # The v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem
33 # To avoid this we pre-download the file and export it via RUSTY_V8_ARCHIVE
34 RUSTY_V8_ARCHIVE = callPackage ./librusty_v8.nix { };
35
36 cargoTestFlags = [
37 "-- --skip=uplink::test::stream_from_uplink_error_no_retry"
38 ];
39
40 meta = with lib; {
41 description = "A configurable, high-performance routing runtime for Apollo Federation";
42 homepage = "https://www.apollographql.com/docs/router/";
43 license = licenses.elastic;
44 maintainers = [ maintainers.bbigras ];
45 };
46}