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