From aa559972082b9aeda33ce43e6a7d1c1a7ab52561 Mon Sep 17 00:00:00 2001 From: Athereo Date: Mon, 28 Sep 2026 01:13:08 +0800 Subject: [PATCH 1/2] refactor(nix): Improve development environment --- flake.nix | 1 - rust-toolchain.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 9e430c1..3ea7ab5 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,6 @@ url = "github:oxalica/rust-overlay"; inputs = { nixpkgs.follows = "nixpkgs"; - flake-utils.follows = "flake-utils"; }; }; }; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 8934eb4..cca0f25 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] channel = "1.95.0" -components = ["clippy", "rustfmt"] +components = ["clippy", "rustfmt", "rust-analyzer"] profile = "minimal" From 05c305a039b25dc61afc3cedddec01613da38b90 Mon Sep 17 00:00:00 2001 From: Athereo Date: Mon, 28 Sep 2026 01:13:08 +0800 Subject: [PATCH 2/2] refactor(nix): Refactor `default.nix` Cleansup code and use better semantics --- default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/default.nix b/default.nix index 7b05e70..b5593da 100644 --- a/default.nix +++ b/default.nix @@ -1,8 +1,8 @@ { pkgs ? import {}, lib ? pkgs.lib, - rustPlatform, - python3, + rustPlatform ? pkgs.rustPlatform, + python3 ? pkgs.python3, }: let manifest = lib.importTOML ./Cargo.toml; in @@ -10,7 +10,7 @@ in pname = manifest.package.name; version = manifest.package.version; - nativeBuildInputs = [ + nativeCheckInputs = [ # Needed for test: # runner::tests::unix::test_python_state_capture_roundtrip python3 @@ -23,6 +23,9 @@ in "vt100-0.16.2" = "sha256-18opt/6FxwTx1CfWUEUm3QajujJvddBdvFDkRpopTtE="; }; + # Uncomment when debugging + # buildType = "debug"; + checkFlags = [ # FIXME: Skipped because NixOS is not guaranteed to have /bin/bash, # which these tests rely on