From 9d1c6f05ab4bc9dffe3e33bd79f7d4e080aafde2 Mon Sep 17 00:00:00 2001 From: jakka Date: Sun, 14 Jun 2026 07:09:07 +0300 Subject: flake tweak --- flake.nix | 89 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 43 insertions(+), 46 deletions(-) diff --git a/flake.nix b/flake.nix index 665c55b..a101868 100644 --- a/flake.nix +++ b/flake.nix @@ -13,54 +13,51 @@ }; outputs = inputs@{ flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } ( - top@{ config, ... }: - { - imports = [ inputs.treefmt-nix.flakeModule ]; - systems = [ - "aarch64-darwin" - "aarch64-linux" - "x86_64-darwin" - "x86_64-linux" - ]; - perSystem = - { pkgs, ... }: - let - naersk' = pkgs.callPackage inputs.naersk { }; - nativeBuildInputs' = with pkgs; [ - cargo - cmake - flac - rustc - sqlite - ]; - in - { - packages.default = naersk'.buildPackage { - src = ./.; - nativeBuildInputs = nativeBuildInputs'; - }; + flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ inputs.treefmt-nix.flakeModule ]; + systems = [ + "aarch64-darwin" + "aarch64-linux" + "x86_64-darwin" + "x86_64-linux" + ]; + perSystem = + { pkgs, ... }: + let + naersk' = pkgs.callPackage inputs.naersk { }; + nativeBuildInputs' = with pkgs; [ + cargo + cmake + flac + rustc + sqlite + ]; + in + { + packages.default = naersk'.buildPackage { + src = ./.; + nativeBuildInputs = nativeBuildInputs'; + }; - devShells.default = pkgs.mkShell { - nativeBuildInputs = nativeBuildInputs'; - packages = with pkgs; [ - nixd - nixfmt - rust-analyzer - rustfmt - clippy - ]; - }; + devShells.default = pkgs.mkShell { + nativeBuildInputs = nativeBuildInputs'; + packages = with pkgs; [ + nixd + nixfmt + rust-analyzer + rustfmt + clippy + ]; + }; - treefmt = { - projectRootFile = "flake.nix"; - programs = { - nixfmt.enable = true; - rustfmt.enable = true; - taplo.enable = true; - }; + treefmt = { + projectRootFile = "flake.nix"; + programs = { + nixfmt.enable = true; + rustfmt.enable = true; + taplo.enable = true; }; }; - } - ); + }; + }; } -- cgit v1.3.1