From 4ed31c02744a46560aa3dc795cb1b78c1c47f9a6 Mon Sep 17 00:00:00 2001 From: Schweber <64630479+Schweber@users.noreply.github.com> Date: Mon, 24 Feb 2025 10:07:42 +0100 Subject: [PATCH] niri: 25.01 -> 25.02 BACKPORT 24.11 --- pkgs/by-name/ni/niri/package.nix | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/ni/niri/package.nix b/pkgs/by-name/ni/niri/package.nix index 847f446628c51..e3ab7ce8e4274 100644 --- a/pkgs/by-name/ni/niri/package.nix +++ b/pkgs/by-name/ni/niri/package.nix @@ -7,7 +7,8 @@ libglvnd, libinput, libxkbcommon, - mesa, + libgbm, + versionCheckHook, nix-update-script, pango, pipewire, @@ -22,15 +23,15 @@ withSystemd ? true, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "niri"; - version = "25.01"; + version = "25.02"; src = fetchFromGitHub { owner = "YaLTeR"; repo = "niri"; - tag = "v${version}"; - hash = "sha256-AJ1rlgNOPb3/+DbS5hkhm21t6Oz8IgqLllwmZt0lyzk="; + tag = "v${finalAttrs.version}"; + hash = "sha256-mTTHA0RAaQcdYe+9A3Jx77cmmyLFHmRoZdd8RpWa+m8="; }; postPatch = '' @@ -40,7 +41,7 @@ rustPlatform.buildRustPackage rec { ''; useFetchCargoVendor = true; - cargoHash = "sha256-eGI3i7FnjZGEfcGvEpNLOog8cgExBJuGoXM/oHsui0M="; + cargoHash = "sha256-xUjBQ65INi5qD7s5SpPw9TISgY6I3bjjUBmpubvM43I="; strictDeps = true; @@ -55,7 +56,7 @@ rustPlatform.buildRustPackage rec { libglvnd # For libEGL libinput libxkbcommon - mesa # For libgbm + libgbm pango seatd wayland # For libwayland-client @@ -103,11 +104,12 @@ rustPlatform.buildRustPackage rec { }; preCheck = '' - export XDG_RUNTIME_DIR=$(mktemp -d) - # See https://github.com/YaLTeR/niri/issues/953 - export RAYON_NUM_THREADS=1 ''; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + doInstallCheck = true; + passthru = { providedSessions = [ "niri" ]; updateScript = nix-update-script { }; @@ -116,7 +118,7 @@ rustPlatform.buildRustPackage rec { meta = { description = "Scrollable-tiling Wayland compositor"; homepage = "https://github.com/YaLTeR/niri"; - changelog = "https://github.com/YaLTeR/niri/releases/tag/v${version}"; + changelog = "https://github.com/YaLTeR/niri/releases/tag/v${finalAttrs.version}"; license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ iogamaster @@ -127,4 +129,4 @@ rustPlatform.buildRustPackage rec { mainProgram = "niri"; platforms = lib.platforms.linux; }; -} +})