https://github.com/alexarice/lin_inf
Raw File
Tip revision: 7f46be46c90d3755b27a9a623485ebc5f19fb403 authored by Alex Rice on 28 July 2022, 08:18:35 UTC
Use non overwritten basis names in output
Tip revision: 7f46be4
flake.nix
{
  description = "Simple rust enviroment";

  inputs = {
    rust-overlay.url = "github:oxalica/rust-overlay";
    flake-utils.url = "github:numtide/flake-utils";
    flake-compat = {
      url = "github:edolstra/flake-compat";
      flake = false;
    };
  };

  outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
    flake-utils.lib.eachDefaultSystem (
      system:
        let
          overlays = [ (import rust-overlay) ];
          pkgs = import nixpkgs {
            inherit system overlays;
          };
          nativeBuildInputs = with pkgs; [
            (
              rust-bin.stable.latest.default.override {
                extensions = [ "rust-src" ]; # seems to be already included in stable
              }
            )
          ];
        in
          {
            devShell = with pkgs; mkShell {
              buildInputs = nativeBuildInputs ++ [
                rust-analyzer
              ];
            };
          }
    );
}
back to top