niri: formatting
This commit is contained in:
parent
c4c770e703
commit
000f4aa56b
1 changed files with 81 additions and 71 deletions
|
@ -11,91 +11,100 @@ let
|
|||
inherit (config.modules.system) isGraphical;
|
||||
inherit (config.meta.mainUser) username;
|
||||
|
||||
|
||||
cfg = config.modules.desktops.niri;
|
||||
|
||||
niri = pkgs.callPackage (_: pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "niri";
|
||||
version = "unstable";
|
||||
niri = pkgs.callPackage (
|
||||
_:
|
||||
pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "niri";
|
||||
version = "unstable";
|
||||
|
||||
src = sources.niri;
|
||||
postPatch = ''
|
||||
patchShebangs resources/niri-session
|
||||
substituteInPlace resources/niri.service \
|
||||
--replace-fail '/usr/bin' "$out/bin"
|
||||
'';
|
||||
src = sources.niri;
|
||||
postPatch = ''
|
||||
patchShebangs resources/niri-session
|
||||
substituteInPlace resources/niri.service \
|
||||
--replace-fail '/usr/bin' "$out/bin"
|
||||
'';
|
||||
|
||||
cargoLock = {
|
||||
allowBuiltinFetchGit = true;
|
||||
lockFile = "${sources.niri}/Cargo.lock";
|
||||
};
|
||||
cargoLock = {
|
||||
allowBuiltinFetchGit = true;
|
||||
lockFile = "${sources.niri}/Cargo.lock";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
doInstallCheck = false;
|
||||
strictDeps = true;
|
||||
doInstallCheck = false;
|
||||
doCheck = false;
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
rustPlatform.bindgenHook
|
||||
pkg-config
|
||||
installShellFiles
|
||||
];
|
||||
nativeBuildInputs = with pkgs; [
|
||||
rustPlatform.bindgenHook
|
||||
pkg-config
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
cairo
|
||||
dbus
|
||||
libGL
|
||||
libdisplay-info
|
||||
libinput
|
||||
seatd
|
||||
libxkbcommon
|
||||
libgbm
|
||||
pango
|
||||
wayland
|
||||
dbus
|
||||
pipewire
|
||||
# Also includes libudev
|
||||
systemd
|
||||
];
|
||||
buildInputs = with pkgs; [
|
||||
cairo
|
||||
dbus
|
||||
libGL
|
||||
libdisplay-info
|
||||
libinput
|
||||
seatd
|
||||
libxkbcommon
|
||||
libgbm
|
||||
pango
|
||||
wayland
|
||||
dbus
|
||||
pipewire
|
||||
# Also includes libudev
|
||||
systemd
|
||||
];
|
||||
|
||||
buildFeatures = [
|
||||
"dbus"
|
||||
"dinit"
|
||||
"xdp-gnome-screencast"
|
||||
"systemd"
|
||||
];
|
||||
buildNoDefaultFeatures = true;
|
||||
buildFeatures = [
|
||||
"dbus"
|
||||
"dinit"
|
||||
"xdp-gnome-screencast"
|
||||
"systemd"
|
||||
];
|
||||
buildNoDefaultFeatures = true;
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd niri \
|
||||
--bash <($out/bin/niri completions bash) \
|
||||
--fish <($out/bin/niri completions fish) \
|
||||
--zsh <($out/bin/niri completions zsh)
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd niri \
|
||||
--bash <($out/bin/niri completions bash) \
|
||||
--fish <($out/bin/niri completions fish) \
|
||||
--zsh <($out/bin/niri completions zsh)
|
||||
|
||||
install -Dm644 resources/niri.desktop -t $out/share/wayland-sessions
|
||||
install -Dm644 resources/niri-portals.conf -t $out/share/xdg-desktop-portal
|
||||
install -Dm755 resources/niri-session $out/bin/niri-session
|
||||
install -Dm644 resources/niri{.service,-shutdown.target} -t $out/share/systemd/user
|
||||
'';
|
||||
install -Dm644 resources/niri.desktop -t $out/share/wayland-sessions
|
||||
install -Dm644 resources/niri-portals.conf -t $out/share/xdg-desktop-portal
|
||||
install -Dm755 resources/niri-session $out/bin/niri-session
|
||||
install -Dm644 resources/niri{.service,-shutdown.target} -t $out/share/systemd/user
|
||||
'';
|
||||
|
||||
env = {
|
||||
# Force linking with libEGL and libwayland-client
|
||||
# so they can be discovered by `dlopen()`
|
||||
RUSTFLAGS = toString (
|
||||
map (arg: "-C link-arg=" + arg) [
|
||||
"-Wl,--push-state,--no-as-needed"
|
||||
"-lEGL"
|
||||
"-lwayland-client"
|
||||
"-Wl,--pop-state"
|
||||
]
|
||||
);
|
||||
};
|
||||
env = {
|
||||
# Force linking with libEGL and libwayland-client
|
||||
# so they can be discovered by `dlopen()`
|
||||
RUSTFLAGS = toString (
|
||||
map (arg: "-C link-arg=" + arg) [
|
||||
"-Wl,--push-state,--no-as-needed"
|
||||
"-lEGL"
|
||||
"-lwayland-client"
|
||||
"-Wl,--pop-state"
|
||||
]
|
||||
++ [
|
||||
"-Ctarget-cpu=native"
|
||||
"-Cpanic=abort"
|
||||
"-Clto=thin"
|
||||
"-Cembed-bitcode=yes"
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
passthru = {
|
||||
providedSessions = [ "niri" ];
|
||||
};
|
||||
passthru = {
|
||||
providedSessions = [ "niri" ];
|
||||
};
|
||||
|
||||
meta.mainProgram = "niri";
|
||||
meta.mainProgram = "niri";
|
||||
|
||||
}) { };
|
||||
}
|
||||
) { };
|
||||
in
|
||||
{
|
||||
options.modules.desktops.niri.enable = mkEnableOption "Niri, a scolling tiling wayland compositor";
|
||||
|
@ -117,6 +126,7 @@ in
|
|||
avizo
|
||||
playerctl
|
||||
wl-clipboard
|
||||
fuzzel
|
||||
;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue