Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 fetchFromGitHub,
4 pkg-config,
5 rustPlatform,
6 openssl,
7}:
8
9rustPlatform.buildRustPackage rec {
10 pname = "rover";
11 version = "0.24.0";
12
13 src = fetchFromGitHub {
14 owner = "apollographql";
15 repo = pname;
16 rev = "v${version}";
17 sha256 = "sha256-uyeePAHBDCzXzwIWrKcc9LHClwSI7DMBYod/o4LfK+Y=";
18 };
19
20 cargoHash = "sha256-uR5XvkHUmZzCHZITKgScmzqjLOIvbPyrih/0B1OpsAc=";
21
22 buildInputs = [
23 openssl
24 ];
25
26 nativeBuildInputs = [
27 pkg-config
28 ];
29
30 env = {
31 OPENSSL_NO_VENDOR = true;
32 };
33
34 # This test checks whether the plugins specified in the plugins json file are
35 # valid by making a network call to the repo that houses their binaries; but, the
36 # build env can't make network calls (impurity)
37 cargoTestFlags = [
38 "-- --skip=latest_plugins_are_valid_versions"
39 ];
40
41 passthru.updateScript = ./update.sh;
42
43 # Some tests try to write configuration data to a location in the user's home
44 # directory. Since this would be /homeless-shelter during the build, point at
45 # a writeable location instead.
46 preCheck = ''
47 export APOLLO_CONFIG_HOME="$PWD"
48 '';
49
50 meta = with lib; {
51 description = "CLI for interacting with ApolloGraphQL's developer tooling, including managing self-hosted and GraphOS graphs";
52 mainProgram = "rover";
53 homepage = "https://www.apollographql.com/docs/rover";
54 license = licenses.mit;
55 maintainers = [
56 maintainers.ivanbrennan
57 maintainers.aaronarinder
58 ];
59 };
60}