Skip to content

🦀 A small flake that provides rust-analyzer for older versions of Rust.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

loichyan/ra-flake

Repository files navigation

🦀 rust-analyzer-flake

A small flake that provides rust-analyzer for older versions of Rust.

🔍 Usage

{
  inputs = {
    nixpkgs.url = "nixpkgs";
    flake-utils.url = "github:numtide/flake-utils";
    ra-flake.url = "github:loichyan/ra-flake";
  };

  outputs = { nixpkgs, flake-utils, ra-flake, ... }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs {
          inherit system;
          overlays = [
            ra-flake.overlays.default
          ];
        };
        rust-analyzer =
          pkgs.ra-flake.make {
            # Select the latest rust-analyzer between 1.56 and 1.57.
            version.rust = "1.56";
            # Or use a release tag directly.
            # version = "2021-11-29";

            # Checksum is required.
            sha256 = "sha256-vh7z8jupVxXPOko3sWUsOB7eji/7lKfwJ/CE3iw97Sw=";

            # Provide hashes of some git dependencies for early versions of rust-analyzer.
            # outputHashes = {
            #   "<crate>" = "<sha256>";
            # };

            # Replace the builtin toolchain with a custom one.
            # cargo = rust;
            # rustc = rust;

            # Additional arguments can be passed to buildRustPackage.
            # override = self: {
            #   "<key>" = "<value>";
            # };
          };
      in
      {
        devShells = {
          default = pkgs.mkShell {
            nativeBuildInputs = [
              rust-analyzer
            ];
          };
        };
      }
    );
}

⚖️ License

Licensed under either of

at your option.

About

🦀 A small flake that provides rust-analyzer for older versions of Rust.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published