flake: Format with nixfmt
This commit is contained in:
@@ -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 = ./.;
|
||||||
@@ -69,12 +76,17 @@
|
|||||||
|
|
||||||
buildInputs = oldAttrs.buildInputs ++ extraBuildInputs;
|
buildInputs = oldAttrs.buildInputs ++ extraBuildInputs;
|
||||||
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ extraNativeBuildInputs;
|
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ extraNativeBuildInputs;
|
||||||
cmakeFlags = (oldAttrs.cmakeFlags or []) ++ [
|
cmakeFlags = (oldAttrs.cmakeFlags or [ ]) ++ [
|
||||||
(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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user