diff --git a/flake.lock b/flake.lock index bf06240f..043218e8 100644 --- a/flake.lock +++ b/flake.lock @@ -56,9 +56,31 @@ "tgi-nix", "nixpkgs" ], + "rust-overlay": "rust-overlay", "tgi-nix": "tgi-nix" } }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "tgi-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1723170066, + "narHash": "sha256-SFkQfOA+8AIYJsPlQtxNP+z5jRLfz91z/aOrV94pPmw=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "fecfe4d7c96fea2982c7907997b387a6b52c1093", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index a67879fc..fdd67d00 100644 --- a/flake.nix +++ b/flake.nix @@ -3,12 +3,17 @@ tgi-nix.url = "github:danieldk/tgi-nix"; nixpkgs.follows = "tgi-nix/nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; + rust-overlay = { + url = "github:oxalica/rust-overlay"; + inputs.nixpkgs.follows = "tgi-nix/nixpkgs"; + }; }; outputs = { self, nixpkgs, flake-utils, + rust-overlay, tgi-nix, }: flake-utils.lib.eachDefaultSystem ( @@ -20,7 +25,10 @@ }; pkgs = import nixpkgs { inherit config system; - overlays = [ tgi-nix.overlay ]; + overlays = [ + rust-overlay.overlays.default + tgi-nix.overlay + ]; }; in { @@ -29,11 +37,14 @@ mkShell { buildInputs = [ - cargo - clippy openssl.dev pkg-config - rustfmt + (rust-bin.stable.latest.default.override { + extensions = [ + "rust-analyzer" + "rust-src" + ]; + }) ] ++ (with python3.pkgs; [ venvShellHook