From ed312f79193c0dd67ca29f0f5bfd57f85532a674 Mon Sep 17 00:00:00 2001 From: imxyy_soope_ Date: Sun, 16 Aug 2026 10:21:18 +0800 Subject: [PATCH] flake: extract devShell.nix and drop flake-compat shell.nix --- devShell.nix | 24 +++++++++++ flake.lock | 115 --------------------------------------------------- flake.nix | 36 ++-------------- shell.nix | 16 ------- 4 files changed, 27 insertions(+), 164 deletions(-) create mode 100644 devShell.nix delete mode 100644 shell.nix diff --git a/devShell.nix b/devShell.nix new file mode 100644 index 0000000..fcd549a --- /dev/null +++ b/devShell.nix @@ -0,0 +1,24 @@ +{ pkgs }: +pkgs.mkShell { + packages = with pkgs; [ + (fenix.latest.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + "rust-analyzer" + ]) + cargo-machete + cargo-bloat + cargo-expand + lldb + valgrind + kdePackages.kcachegrind + hyperfine + just + samply + tokei + tombi + ]; +} diff --git a/flake.lock b/flake.lock index e4b3eed..3988785 100644 --- a/flake.lock +++ b/flake.lock @@ -1,38 +1,5 @@ { "nodes": { - "bun2nix": { - "inputs": { - "flake-parts": [ - "llm-agents", - "flake-parts" - ], - "nixpkgs": [ - "llm-agents", - "nixpkgs" - ], - "systems": [ - "llm-agents", - "systems" - ], - "treefmt-nix": [ - "llm-agents", - "treefmt-nix" - ] - }, - "locked": { - "lastModified": 1782772816, - "narHash": "sha256-s9BuFv0mRuZx9C1MF8qPHRdcAK14ONi0A5m6E2wqOoM=", - "owner": "nix-community", - "repo": "bun2nix", - "rev": "5a39d717029e94163ac223aee8d5c9946cafed1c", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "bun2nix", - "type": "github" - } - }, "fenix": { "inputs": { "nixpkgs": [ @@ -68,51 +35,6 @@ "url": "https://git.lix.systems/lix-project/flake-compat/archive/main.tar.gz" } }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "llm-agents", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1782949081, - "narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "llm-agents": { - "inputs": { - "bun2nix": "bun2nix", - "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1784096685, - "narHash": "sha256-b32HyAoqQdgQstUBblZ5Nnk5M62yiOhpgpJVJohJ+k0=", - "owner": "numtide", - "repo": "llm-agents.nix", - "rev": "d9654e7480b8146fddd709dbe5d12668bb34fa74", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "llm-agents.nix", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1784007870, @@ -133,7 +55,6 @@ "inputs": { "fenix": "fenix", "flake-compat": "flake-compat", - "llm-agents": "llm-agents", "nixpkgs": "nixpkgs" } }, @@ -153,42 +74,6 @@ "repo": "rust-analyzer", "type": "github" } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "llm-agents", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1780220602, - "narHash": "sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "db947814a175b7ca6ded66e21383d938df01c227", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 887d75f..e064354 100644 --- a/flake.nix +++ b/flake.nix @@ -3,17 +3,13 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; fenix.url = "github:nix-community/fenix"; fenix.inputs.nixpkgs.follows = "nixpkgs"; - llm-agents = { - url = "github:numtide/llm-agents.nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; flake-compat = { url = "https://git.lix.systems/lix-project/flake-compat/archive/main.tar.gz"; flake = false; }; }; outputs = - inputs@{ nixpkgs, fenix, ... }: + { nixpkgs, fenix, ... }: let forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; in @@ -24,37 +20,11 @@ pkgs = import nixpkgs { inherit system; config.allowUnfree = true; + overlays = [ fenix.overlays.default ]; }; - llm-agents = inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}; in { - default = pkgs.mkShell { - packages = with pkgs; [ - (fenix.packages.${system}.latest.withComponents [ - "cargo" - "clippy" - "rust-src" - "rustc" - "rustfmt" - "rust-analyzer" - ]) - cargo-machete - cargo-bloat - lldb - valgrind - kdePackages.kcachegrind - hyperfine - just - samply - tokei - tombi - - # llm-agents.codex - llm-agents.claude-code - llm-agents.opencode - # llm-agents.forge - ]; - }; + default = import ./devShell.nix { inherit pkgs; }; } ); }; diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 798fc6a..0000000 --- a/shell.nix +++ /dev/null @@ -1,16 +0,0 @@ -let - lockFile = builtins.fromJSON (builtins.readFile ./flake.lock); - flake-compat-node = lockFile.nodes.${lockFile.nodes.root.inputs.flake-compat}; - flake-compat = builtins.fetchTarball { - inherit (flake-compat-node.locked) url; - sha256 = flake-compat-node.locked.narHash; - }; - - flake = ( - import flake-compat { - src = ./.; - copySourceTreeToStore = false; - } - ); -in - flake.shellNix