flake.nix: fenix -> rust-overlay, flake.lock: bump, Cargo.{toml,lock}: update inputs

This commit is contained in:
2026-01-02 19:33:28 +09:00
parent d42a9f1f4f
commit 7e302475f7
3 changed files with 37 additions and 51 deletions

View File

@@ -13,7 +13,7 @@ edition = "2024"
rust-version = "1.85.0"
[dependencies]
serde_json = "1.0.145"
serde_json = "1.0.148"
log = "0.4.29"
serde = { version = "1.0.228", features = ["derive"] }
tokio = { version = "1.48.0", features = ["sync", "macros", "rt", "net"] }

54
flake.lock generated
View File

@@ -1,33 +1,12 @@
{
"nodes": {
"fenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1765435813,
"narHash": "sha256-C6tT7K1Lx6VsYw1BY5S3OavtapUvEnDQtmQB5DSgbCc=",
"owner": "nix-community",
"repo": "fenix",
"rev": "6399553b7a300c77e7f07342904eb696a5b6bf9d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1765472234,
"narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=",
"lastModified": 1767116409,
"narHash": "sha256-5vKw92l1GyTnjoLzEagJy5V5mDFck72LiQWZSOnSicw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b",
"rev": "cad22e7d996aea55ecab064e84834289143e44a0",
"type": "github"
},
"original": {
@@ -39,24 +18,27 @@
},
"root": {
"inputs": {
"fenix": "fenix",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-analyzer-src": {
"flake": false,
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1765400135,
"narHash": "sha256-D3+4hfNwUhG0fdCpDhOASLwEQ1jKuHi4mV72up4kLQM=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "fface27171988b3d605ef45cf986c25533116f7e",
"lastModified": 1767322002,
"narHash": "sha256-yHKXXw2OWfIFsyTjduB4EyFwR0SYYF0hK8xI9z4NIn0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "03c6e38661c02a27ca006a284813afdc461e9f7e",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}

View File

@@ -1,11 +1,12 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, fenix }@inputs:
outputs = { self, nixpkgs, rust-overlay }@inputs:
let
systems = [
"x86_64-linux"
@@ -14,26 +15,29 @@
"aarch64-darwin"
];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: let
toolchain = fenix.packages.${system}.complete;
pkgs = import nixpkgs {
inherit system;
overlays = [
(_: super: let pkgs = fenix.inputs.nixpkgs.legacyPackages.${system}; in fenix.overlays.default pkgs pkgs)
(import rust-overlay)
];
};
rust-bin = rust-overlay.lib.mkRustBin { } pkgs.buildPackages;
toolchain = rust-bin.stable.latest.default.override {
extensions = [ "rust-src" ];
};
in f system pkgs toolchain);
in {
devShell = forAllSystems (system: pkgs: toolchain: pkgs.mkShell {
packages = [
(toolchain.withComponents [
"cargo" "rustc" "rustfmt" "clippy" "llvm-tools"
])
pkgs.mpv
pkgs.grcov
pkgs.cargo-nextest
pkgs.cargo-edit
packages = with pkgs; [
toolchain
mpv
grcov
cargo-nextest
cargo-edit
];
RUST_SRC_PATH = "${toolchain.rust-src}/lib/rustlib/src/rust/library";
env.RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
});
};
}