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": { "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": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -20,11 +41,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1723637854, "lastModified": 1725983898,
"narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", "narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9", "rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -34,44 +55,27 @@
"type": "github" "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": { "root": {
"inputs": { "inputs": {
"fenix": "fenix",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs"
"rust-overlay": "rust-overlay"
} }
}, },
"rust-overlay": { "rust-analyzer-src": {
"inputs": { "flake": false,
"nixpkgs": "nixpkgs_2"
},
"locked": { "locked": {
"lastModified": 1723947704, "lastModified": 1725985110,
"narHash": "sha256-TcVf66N2NgGhxORFytzgqWcg0XJ+kk8uNLNsTRI5sYM=", "narHash": "sha256-0HKj+JI6rtxaE6Kzcd6HyFNbEFJRsLy5DoNgVF1pyRM=",
"owner": "oxalica", "owner": "rust-lang",
"repo": "rust-overlay", "repo": "rust-analyzer",
"rev": "456e78a55feade2c3bc6d7bc0bf5e710c9d86120", "rev": "bcc708992104c2059f310fbc3ac00bfc377f9ea8",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "oxalica", "owner": "rust-lang",
"repo": "rust-overlay", "ref": "nightly",
"repo": "rust-analyzer",
"type": "github" "type": "github"
} }
}, },

View file

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