Skip to content

Commit 0b3aa63

Browse files
authored
niri: 25.01 -> 25.02 and refactor (#384183)
2 parents 151a3ff + 92a55af commit 0b3aa63

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

pkgs/by-name/ni/niri/package.nix

+12-9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
libinput,
99
libxkbcommon,
1010
libgbm,
11+
versionCheckHook,
1112
nix-update-script,
1213
pango,
1314
pipewire,
@@ -22,15 +23,15 @@
2223
withSystemd ? true,
2324
}:
2425

25-
rustPlatform.buildRustPackage rec {
26+
rustPlatform.buildRustPackage (finalAttrs: {
2627
pname = "niri";
27-
version = "25.01";
28+
version = "25.02";
2829

2930
src = fetchFromGitHub {
3031
owner = "YaLTeR";
3132
repo = "niri";
32-
tag = "v${version}";
33-
hash = "sha256-AJ1rlgNOPb3/+DbS5hkhm21t6Oz8IgqLllwmZt0lyzk=";
33+
tag = "v${finalAttrs.version}";
34+
hash = "sha256-mTTHA0RAaQcdYe+9A3Jx77cmmyLFHmRoZdd8RpWa+m8=";
3435
};
3536

3637
postPatch = ''
@@ -40,7 +41,7 @@ rustPlatform.buildRustPackage rec {
4041
'';
4142

4243
useFetchCargoVendor = true;
43-
cargoHash = "sha256-eGI3i7FnjZGEfcGvEpNLOog8cgExBJuGoXM/oHsui0M=";
44+
cargoHash = "sha256-xUjBQ65INi5qD7s5SpPw9TISgY6I3bjjUBmpubvM43I=";
4445

4546
strictDeps = true;
4647

@@ -104,10 +105,12 @@ rustPlatform.buildRustPackage rec {
104105

105106
preCheck = ''
106107
export XDG_RUNTIME_DIR=$(mktemp -d)
107-
# See https://github.com/YaLTeR/niri/issues/953
108-
export RAYON_NUM_THREADS=1
109108
'';
110109

110+
nativeInstallCheckInputs = [ versionCheckHook ];
111+
versionCheckProgramArg = "--version";
112+
doInstallCheck = true;
113+
111114
passthru = {
112115
providedSessions = [ "niri" ];
113116
updateScript = nix-update-script { };
@@ -116,7 +119,7 @@ rustPlatform.buildRustPackage rec {
116119
meta = {
117120
description = "Scrollable-tiling Wayland compositor";
118121
homepage = "https://github.com/YaLTeR/niri";
119-
changelog = "https://github.com/YaLTeR/niri/releases/tag/v${version}";
122+
changelog = "https://github.com/YaLTeR/niri/releases/tag/v${finalAttrs.version}";
120123
license = lib.licenses.gpl3Only;
121124
maintainers = with lib.maintainers; [
122125
iogamaster
@@ -127,4 +130,4 @@ rustPlatform.buildRustPackage rec {
127130
mainProgram = "niri";
128131
platforms = lib.platforms.linux;
129132
};
130-
}
133+
})

0 commit comments

Comments
 (0)