diff options
| author | Stefan Kreutz <mail@skreutz.com> | 2025-12-07 15:34:09 +0100 |
|---|---|---|
| committer | Stefan Kreutz <mail@skreutz.com> | 2025-12-07 15:34:09 +0100 |
| commit | f74ec891c20622810195d7c8f0092a80204a555f (patch) | |
| tree | 7c8f5f104d8687f95c7f7380b8620383b3387b96 /flake.nix | |
| parent | 2532728f8c154900f8bd910888cd91d2589ff866 (diff) | |
| download | parseq-f74ec891c20622810195d7c8f0092a80204a555f.tar | |
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 52 |
1 files changed, 36 insertions, 16 deletions
@@ -3,22 +3,42 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - flake-utils.url = "github:numtide/flake-utils"; + flake-parts.url = "github:hercules-ci/flake-parts"; }; - outputs = { self, nixpkgs, flake-utils, ... }@inputs: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { - inherit system; - config = { }; - overlays = [ ]; - }; - in { - # nix develop - devShells.default = pkgs.mkShell { - nativeBuildInputs = with pkgs; [ rustc cargo rustfmt clippy cargo-audit cargo-edit rust-analyzer ]; - }; - } - ); + outputs = + inputs@{ + self, + nixpkgs, + flake-parts, + ... + }: + flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + perSystem = + { pkgs, system, ... }: + { + # nix develop + devShells.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + rustc + cargo + rustfmt + clippy + cargo-audit + cargo-edit + rust-analyzer + ]; + }; + + # nix fmt + formatter = pkgs.nixfmt-tree; + }; + }; } |