diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-05-31 09:59:33 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-05-31 09:59:57 +0000 |
commit | 9ff36293d1e428cd7bf03e8d4b03611b6d361c28 (patch) | |
tree | 1ab51a42b868c55b83f6ccdb80371b9888739dd9 /pkgs/development/tools/rover/default.nix | |
parent | 1c4fcd0d4b0541e674ee56ace1053e23e562cc80 (diff) | |
parent | ddc3c396a51918043bb0faa6f676abd9562be62c (diff) | |
download | nixpkgs-archive.tar nixpkgs-archive.tar.gz nixpkgs-archive.tar.bz2 nixpkgs-archive.tar.lz nixpkgs-archive.tar.xz nixpkgs-archive.tar.zst nixpkgs-archive.zip |
Last good Nixpkgs for Weston+nouveau? archive
I came this commit hash to terwiz[m] on IRC, who is trying to figure out what the last version of Spectrum that worked on their NUC with Nvidia graphics is.
Diffstat (limited to 'pkgs/development/tools/rover/default.nix')
-rw-r--r-- | pkgs/development/tools/rover/default.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/development/tools/rover/default.nix b/pkgs/development/tools/rover/default.nix new file mode 100644 index 00000000000..7232089ee99 --- /dev/null +++ b/pkgs/development/tools/rover/default.nix @@ -0,0 +1,56 @@ +{ lib +, callPackage +, fetchFromGitHub +, perl +, rustPlatform +, librusty_v8 ? callPackage ./librusty_v8.nix { } +}: + +rustPlatform.buildRustPackage rec { + pname = "rover"; + version = "0.4.8"; + + src = fetchFromGitHub { + owner = "apollographql"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-9o2bGa9vxN7EprKgsy9TI7AFmwjo1OT1pDyiLierTq0="; + }; + + cargoSha256 = "sha256-4oNuyZ1xNK2jP9QFEcthCjEQRyvFykd5N0j5KCXrzVY="; + + # 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 = librusty_v8; + + nativeBuildInputs = [ + perl + ]; + + # The rover-client's build script (crates/rover-client/build.rs) will try to + # download the API's graphql schema at build time to our read-only filesystem. + # To avoid this we pre-download it to a location the build script checks. + preBuild = '' + mkdir crates/rover-client/.schema + cp ${./schema}/etag.id crates/rover-client/.schema/ + cp ${./schema}/schema.graphql crates/rover-client/.schema/ + ''; + + passthru.updateScript = ./update.sh; + + # Some tests try to write configuration data to a location in the user's home + # directory. Since this would be /homeless-shelter during the build, point at + # a writeable location instead. + preCheck = '' + export APOLLO_CONFIG_HOME="$PWD" + ''; + + meta = with lib; { + description = "A CLI for managing and maintaining graphs with Apollo Studio"; + homepage = "https://www.apollographql.com/docs/rover"; + license = licenses.mit; + maintainers = [ maintainers.ivanbrennan ]; + platforms = ["x86_64-linux"]; + }; +} |