mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-24 02:01:18 +07:00
flake: format with nixfmt
This commit is contained in:
@@ -13,7 +13,8 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs =
|
||||||
|
{
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
crane,
|
crane,
|
||||||
@@ -21,11 +22,16 @@
|
|||||||
flake-utils,
|
flake-utils,
|
||||||
fenix,
|
fenix,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
systems = ["aarch64-linux" "x86_64-linux"];
|
let
|
||||||
|
systems = [
|
||||||
|
"aarch64-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
in
|
in
|
||||||
flake-utils.lib.eachSystem systems (
|
flake-utils.lib.eachSystem systems (
|
||||||
system: let
|
system:
|
||||||
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
toolchain = fenix.packages.${system}.complete.toolchain;
|
toolchain = fenix.packages.${system}.complete.toolchain;
|
||||||
craneLib = (crane.mkLib pkgs).overrideToolchain toolchain;
|
craneLib = (crane.mkLib pkgs).overrideToolchain toolchain;
|
||||||
@@ -36,10 +42,10 @@
|
|||||||
|
|
||||||
src = nixpkgs.lib.cleanSourceWith {
|
src = nixpkgs.lib.cleanSourceWith {
|
||||||
src = craneLib.path ./.;
|
src = craneLib.path ./.;
|
||||||
filter = path: type:
|
filter =
|
||||||
|
path: type:
|
||||||
(builtins.match "resources" path == null)
|
(builtins.match "resources" path == null)
|
||||||
|| ((craneLib.filterCargoSources path type)
|
|| ((craneLib.filterCargoSources path type) && (builtins.match "niri-visual-tests" path == null));
|
||||||
&& (builtins.match "niri-visual-tests" path == null));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
@@ -83,17 +89,20 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
cargoArtifacts = craneLib.buildDepsOnly craneArgs;
|
cargoArtifacts = craneLib.buildDepsOnly craneArgs;
|
||||||
niri = craneLib.buildPackage (craneArgs // {inherit cargoArtifacts;});
|
niri = craneLib.buildPackage (craneArgs // { inherit cargoArtifacts; });
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
formatter = pkgs.nixfmt-rfc-style;
|
formatter = pkgs.nixfmt-rfc-style;
|
||||||
|
|
||||||
checks.niri = niri;
|
checks.niri = niri;
|
||||||
packages.default = niri;
|
packages.default = niri;
|
||||||
|
|
||||||
devShells.default = craneLib.devShell {
|
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;
|
inherit (niri) LIBCLANG_PATH;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user