Compare commits

..

2 commits

Author SHA1 Message Date
d07a769a37
flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c3aa7b8938b17aebd2deecf7be0636000d62a2b9' (2024-08-14)
  → 'github:NixOS/nixpkgs/1355a0cbfeac61d785b7183c0caaec1f97361b43' (2024-09-10)
2024-09-12 01:36:10 -07:00
8a506bb4c8
feat: use fenix instead of rust-overlay 2024-09-12 01:35:54 -07:00
2 changed files with 61 additions and 54 deletions

View file

@ -1,5 +1,26 @@
{
"nodes": {
"fenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1726116637,
"narHash": "sha256-tU2GhwU887mPg6C4c2k+CEBAnKY6R0tSeQYtoqjZmLM=",
"owner": "nix-community",
"repo": "fenix",
"rev": "96a04a213838c5001619ad57400c5a176fa040b1",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -20,11 +41,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1723637854,
"narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=",
"lastModified": 1725983898,
"narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9",
"rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43",
"type": "github"
},
"original": {
@ -34,44 +55,27 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1718428119,
"narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"fenix": "fenix",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
"nixpkgs": "nixpkgs"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1723947704,
"narHash": "sha256-TcVf66N2NgGhxORFytzgqWcg0XJ+kk8uNLNsTRI5sYM=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "456e78a55feade2c3bc6d7bc0bf5e710c9d86120",
"lastModified": 1725985110,
"narHash": "sha256-0HKj+JI6rtxaE6Kzcd6HyFNbEFJRsLy5DoNgVF1pyRM=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "bcc708992104c2059f310fbc3ac00bfc377f9ea8",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},

View file

@ -4,22 +4,28 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
outputs =
{
nixpkgs,
flake-utils,
rust-overlay,
fenix,
...
}:
flake-utils.lib.eachDefaultSystem (
system: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
in {
system:
let
pkgs = import nixpkgs { inherit system; };
rustPkgs = fenix.packages.${system};
in
{
formatter = pkgs.nixfmt-rfc-style;
devShells = {
go = pkgs.mkShell {
buildInputs = with pkgs; [
@ -58,23 +64,20 @@
};
rustBeta = pkgs.mkShell {
buildInputs = with pkgs; [
rust-bin.beta.latest.default
rust-analyzer
buildInputs = [
rustPkgs.beta.completeToolchain
];
};
rustNightly = pkgs.mkShell {
buildInputs = with pkgs; [
rust-bin.nightly.latest.default
rust-analyzer
buildInputs = [
rustPkgs.complete.toolchain
];
};
rustStable = pkgs.mkShell {
buildInputs = with pkgs; [
rust-bin.stable.latest.default
rust-analyzer
buildInputs = [
rustPkgs.stable.completeToolchain
];
};