aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <getchoo@tuta.io>2024-09-27 12:42:44 -0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-10-05 12:09:24 -0700
commite6203313cec9c26a98e3034df3c302cc4a482850 (patch)
treeaee394a4ef10df6f7ddf18cd0792052a9a496f43
parent938061dd5edfdc1d1e3451e8495225af8555a47f (diff)
downloadniri-e6203313cec9c26a98e3034df3c302cc4a482850.tar.gz
niri-e6203313cec9c26a98e3034df3c302cc4a482850.tar.bz2
niri-e6203313cec9c26a98e3034df3c302cc4a482850.zip
flake: format with nixfmt
-rw-r--r--flake.nix47
1 files changed, 28 insertions, 19 deletions
diff --git a/flake.nix b/flake.nix
index 0c9662b6..d5380dca 100644
--- a/flake.nix
+++ b/flake.nix
@@ -13,19 +13,25 @@
};
};
- outputs = {
- self,
- nixpkgs,
- crane,
- nix-filter,
- flake-utils,
- fenix,
- ...
- }: let
- systems = ["aarch64-linux" "x86_64-linux"];
- in
+ outputs =
+ {
+ self,
+ nixpkgs,
+ crane,
+ nix-filter,
+ flake-utils,
+ fenix,
+ ...
+ }:
+ let
+ systems = [
+ "aarch64-linux"
+ "x86_64-linux"
+ ];
+ in
flake-utils.lib.eachSystem systems (
- system: let
+ system:
+ let
pkgs = nixpkgs.legacyPackages.${system};
toolchain = fenix.packages.${system}.complete.toolchain;
craneLib = (crane.mkLib pkgs).overrideToolchain toolchain;
@@ -36,10 +42,10 @@
src = nixpkgs.lib.cleanSourceWith {
src = craneLib.path ./.;
- filter = path: type:
+ filter =
+ path: type:
(builtins.match "resources" path == null)
- || ((craneLib.filterCargoSources path type)
- && (builtins.match "niri-visual-tests" path == null));
+ || ((craneLib.filterCargoSources path type) && (builtins.match "niri-visual-tests" path == null));
};
nativeBuildInputs = with pkgs; [
@@ -83,17 +89,20 @@
};
cargoArtifacts = craneLib.buildDepsOnly craneArgs;
- niri = craneLib.buildPackage (craneArgs // {inherit cargoArtifacts;});
- in {
+ niri = craneLib.buildPackage (craneArgs // { inherit cargoArtifacts; });
+ in
+ {
formatter = pkgs.nixfmt-rfc-style;
checks.niri = niri;
packages.default = niri;
devShells.default = craneLib.devShell {
- inputsFrom = [niri];
+ inputsFrom = [ niri ];
- LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (craneArgs.runtimeDependencies ++ craneArgs.nativeBuildInputs ++ craneArgs.buildInputs);
+ LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (
+ craneArgs.runtimeDependencies ++ craneArgs.nativeBuildInputs ++ craneArgs.buildInputs
+ );
inherit (niri) LIBCLANG_PATH;
};
}