summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorStefan Kreutz <mail@skreutz.com>2025-12-07 15:34:09 +0100
committerStefan Kreutz <mail@skreutz.com>2025-12-07 15:34:09 +0100
commitf74ec891c20622810195d7c8f0092a80204a555f (patch)
tree7c8f5f104d8687f95c7f7380b8620383b3387b96 /flake.nix
parent2532728f8c154900f8bd910888cd91d2589ff866 (diff)
downloadparseq-f74ec891c20622810195d7c8f0092a80204a555f.tar
Use flake-parts instead of flake-utilsHEADmain
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix52
1 files changed, 36 insertions, 16 deletions
diff --git a/flake.nix b/flake.nix
index 43a2072..bdd81ea 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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;
+ };
+ };
}
Generated by cgit. See skreutz.com for my tech blog and contact information.