From 1f0f1b3a78111dfef8ddd168b85d25702884eaa1 Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Thu, 8 Jan 2026 09:17:05 +0000 Subject: [PATCH] chore(nix): remove flake-parts dependency Simplify flake.nix by removing flake-parts and using standard nixpkgs.lib.genAttrs pattern instead. The devShell configuration is simple enough that flake-parts adds unnecessary complexity. - Remove flake-parts input - Use forAllSystems helper with genAttrs - Maintain identical functionality --- flake.lock | 34 ---------------------------------- flake.nix | 21 +++++++++++++-------- 2 files changed, 13 insertions(+), 42 deletions(-) diff --git a/flake.lock b/flake.lock index 2102993..644277d 100644 --- a/flake.lock +++ b/flake.lock @@ -1,23 +1,5 @@ { "nodes": { - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1767609335, - "narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "250481aafeb741edfe23d29195671c19b36b6dca", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1767364772, @@ -34,24 +16,8 @@ "type": "github" } }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1765674936, - "narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, "root": { "inputs": { - "flake-parts": "flake-parts", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index 20306c5..822f98f 100644 --- a/flake.nix +++ b/flake.nix @@ -3,22 +3,26 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - flake-parts.url = "github:hercules-ci/flake-parts"; }; outputs = - inputs@{ flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { + { nixpkgs, ... }: + let systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ]; - - perSystem = - { pkgs, ... }: + forAllSystems = nixpkgs.lib.genAttrs systems; + in + { + devShells = forAllSystems ( + system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in { - devShells.default = pkgs.mkShell { + default = pkgs.mkShell { buildInputs = with pkgs; [ # runtime nodejs_24 @@ -42,6 +46,7 @@ fi ''; }; - }; + } + ); }; }