flake: Format with nixfmt

This commit is contained in:
Sapphire
2026-10-01 19:49:42 -05:00
parent 5f604e1fc3
commit 3136066aa9
+24 -12
View File
@@ -2,10 +2,13 @@
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.flake-parts.url = "github:hercules-ci/flake-parts"; inputs.flake-parts.url = "github:hercules-ci/flake-parts";
outputs = inputs@{ nixpkgs, flake-parts, ... }: outputs =
inputs@{ nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];
perSystem = { lib, pkgs, ... }: let perSystem =
{ lib, pkgs, ... }:
let
# Extra build inputs only inside the devShell. # Extra build inputs only inside the devShell.
devBuildInputs = [ devBuildInputs = [
# for client build # for client build
@@ -30,18 +33,22 @@
pkgs.util-linux pkgs.util-linux
]; ];
package = pkgs.enableDebugging (pkgs.wivrn.overrideAttrs (finalAttrs: oldAttrs: { package = pkgs.enableDebugging (
pkgs.wivrn.overrideAttrs (
finalAttrs: oldAttrs: {
# Filter the directories and files we don't need to keep to avoid needless rebuilds # Filter the directories and files we don't need to keep to avoid needless rebuilds
src = lib.cleanSourceWith { src = lib.cleanSourceWith {
filter = name: type: let filter =
name: type:
let
baseName = baseNameOf (toString name); baseName = baseNameOf (toString name);
in in
(lib.cleanSourceFilter name type) && (lib.cleanSourceFilter name type)
!( && !(
(type == "directory" && ( (
baseName == ".direnv" type == "directory"
|| baseName == ".cxx" && (baseName == ".direnv" || baseName == ".cxx" || lib.hasPrefix "build" baseName)
|| lib.hasPrefix "build" baseName)) )
|| baseName == ".envrc" || baseName == ".envrc"
); );
src = ./.; src = ./.;
@@ -73,8 +80,13 @@
(lib.cmakeFeature "GIT_DESC" "nightly") (lib.cmakeFeature "GIT_DESC" "nightly")
(lib.cmakeFeature "GIT_COMMIT" "nightly") (lib.cmakeFeature "GIT_COMMIT" "nightly")
]; ];
})); }
in { )
);
in
{
formatter = pkgs.nixfmt;
packages = { packages = {
default = package; default = package;
dissector = package.overrideAttrs (oldAttrs: { dissector = package.overrideAttrs (oldAttrs: {