From 562155c1c6d84f310d5d60f5b6650809a083cb24 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Mon, 26 Jan 2026 19:46:41 +0100 Subject: [PATCH 1/3] add result to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6abfe1b..fdf11bc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target /.direnv +/result From 1e0501ae629ec7c47a74fe66ca28b6f550378221 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Mon, 26 Jan 2026 19:47:10 +0100 Subject: [PATCH 2/3] autoformat flake --- flake.nix | 85 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 57 insertions(+), 28 deletions(-) diff --git a/flake.nix b/flake.nix index cc91276..ddf719a 100644 --- a/flake.nix +++ b/flake.nix @@ -20,8 +20,18 @@ }; }; - outputs = { self, nixpkgs, crane, fenix, flake-utils, advisory-db, ... }: - flake-utils.lib.eachDefaultSystem (system: + outputs = + { + self, + nixpkgs, + crane, + fenix, + flake-utils, + advisory-db, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: let pkgs = nixpkgs.legacyPackages.${system}; @@ -37,7 +47,8 @@ buildInputs = [ # Add additional build inputs here - ] ++ lib.optionals pkgs.stdenv.isDarwin [ + ] + ++ lib.optionals pkgs.stdenv.isDarwin [ # Additional darwin specific inputs can be set here pkgs.libiconv ]; @@ -46,12 +57,13 @@ # MY_CUSTOM_VAR = "some value"; }; - craneLibLLvmTools = craneLib.overrideToolchain - (fenix.packages.${system}.complete.withComponents [ + craneLibLLvmTools = craneLib.overrideToolchain ( + fenix.packages.${system}.complete.withComponents [ "cargo" "llvm-tools" "rustc" - ]); + ] + ); # Build *just* the cargo dependencies, so we can reuse # all of that work (e.g. via cachix) when running in CI @@ -59,9 +71,12 @@ # Build the actual crate itself, reusing the dependency # artifacts from above. - my-crate = craneLib.buildPackage (commonArgs // { - inherit cargoArtifacts; - }); + my-crate = craneLib.buildPackage ( + commonArgs + // { + inherit cargoArtifacts; + } + ); in { checks = { @@ -74,14 +89,20 @@ # Note that this is done as a separate derivation so that # we can block the CI if there are issues here, but not # prevent downstream consumers from building our crate by itself. - my-crate-clippy = craneLib.cargoClippy (commonArgs // { - inherit cargoArtifacts; - cargoClippyExtraArgs = "--all-targets -- --deny warnings"; - }); + my-crate-clippy = craneLib.cargoClippy ( + commonArgs + // { + inherit cargoArtifacts; + cargoClippyExtraArgs = "--all-targets -- --deny warnings"; + } + ); - my-crate-doc = craneLib.cargoDoc (commonArgs // { - inherit cargoArtifacts; - }); + my-crate-doc = craneLib.cargoDoc ( + commonArgs + // { + inherit cargoArtifacts; + } + ); # Check formatting my-crate-fmt = craneLib.cargoFmt { @@ -107,19 +128,26 @@ # Run tests with cargo-nextest # Consider setting `doCheck = false` on `my-crate` if you do not want # the tests to run twice - my-crate-nextest = craneLib.cargoNextest (commonArgs // { - inherit cargoArtifacts; - partitions = 1; - partitionType = "count"; - }); + my-crate-nextest = craneLib.cargoNextest ( + commonArgs + // { + inherit cargoArtifacts; + partitions = 1; + partitionType = "count"; + } + ); }; packages = { default = my-crate; - } // lib.optionalAttrs (!pkgs.stdenv.isDarwin) { - my-crate-llvm-coverage = craneLibLLvmTools.cargoLlvmCov (commonArgs // { - inherit cargoArtifacts; - }); + } + // lib.optionalAttrs (!pkgs.stdenv.isDarwin) { + my-crate-llvm-coverage = craneLibLLvmTools.cargoLlvmCov ( + commonArgs + // { + inherit cargoArtifacts; + } + ); }; apps.default = flake-utils.lib.mkApp { @@ -136,9 +164,10 @@ # Extra inputs can be added here; cargo and rustc are provided by default. packages = [ # pkgs.ripgrep - pkgs.wgo - pkgs.cargo-flamegraph + pkgs.wgo + pkgs.cargo-flamegraph ]; }; - }); + } + ); } From 1abc3fba2f8d8fb01e5cc31f7cbbf474507fd84d Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Mon, 26 Jan 2026 19:47:43 +0100 Subject: [PATCH 3/3] remove unneeded deps --- flake.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/flake.nix b/flake.nix index ddf719a..db35deb 100644 --- a/flake.nix +++ b/flake.nix @@ -163,9 +163,6 @@ # Extra inputs can be added here; cargo and rustc are provided by default. packages = [ - # pkgs.ripgrep - pkgs.wgo - pkgs.cargo-flamegraph ]; }; }