diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 89 |
1 files changed, 43 insertions, 46 deletions
@@ -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; }; }; - } - ); + }; + }; } |
