use oxalica's rust-overlay
This commit is contained in:
parent
117771bb45
commit
334d28540a
3 changed files with 37 additions and 3 deletions
26
flake.lock
26
flake.lock
|
@ -37,7 +37,31 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1702088052,
|
||||
"narHash": "sha256-FkwIBTAMsxyceQce0Mbm+/+cOjj2r5IHBK4R/ekPNaw=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "2cfb76b8e836a26efecd9f853bea78355a11c58a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
|
10
flake.nix
10
flake.nix
|
@ -4,12 +4,20 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
flake-utils.follows = "flake-utils";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
|
||||
outputs = { self, nixpkgs, flake-utils, rust-overlay }: flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ rust-overlay.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{ pkgs }: pkgs.mkShell {
|
||||
packages = with pkgs; [ cargo rustc rustfmt rust-analyzer ];
|
||||
buildInputs = with pkgs; [
|
||||
(rust-bin.stable.latest.default.override { extensions = [ "rust-src" "rust-analyzer" ]; })
|
||||
];
|
||||
shellHook = ''
|
||||
export CARGO_HOME=$PWD/.nix/cargo
|
||||
export PATH=$CARGO_HOME/bin:$PATH
|
||||
|
|
Loading…
Reference in a new issue