Skip to content

Commit

Permalink
niri: cleanup
Browse files Browse the repository at this point in the history
This reorders some of the attributes to be a bit more sensible, as well
as adopts some "best practices"
  • Loading branch information
getchoo committed Oct 8, 2024
1 parent f1cf61e commit f03374e
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions pkgs/by-name/ni/niri/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ rustPlatform.buildRustPackage rec {
src = fetchFromGitHub {
owner = "YaLTeR";
repo = "niri";
rev = "v${version}";
rev = "refs/tags/v${version}";
hash = "sha256-4YDrKMwXGVOBkeaISbxqf24rLuHvO98TnqxWYfgiSeg=";
};

postPatch = ''
patchShebangs resources/niri-session
substituteInPlace resources/niri.service \
--replace-fail '/usr/bin' "$out/bin"
'';

cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
Expand Down Expand Up @@ -59,14 +65,6 @@ rustPlatform.buildRustPackage rec {
wayland # For libwayland-client
];

passthru.providedSessions = [ "niri" ];

postPatch = ''
patchShebangs ./resources/niri-session
substituteInPlace ./resources/niri.service \
--replace-fail '/usr/bin' "$out/bin"
'';

postInstall = ''
install -Dm0755 ./resources/niri-session -t $out/bin
install -Dm0644 resources/niri.desktop -t $out/share/wayland-sessions
Expand All @@ -87,18 +85,21 @@ rustPlatform.buildRustPackage rec {
);
};

passthru.updateScript = nix-update-script { };
passthru = {
providedSessions = [ "niri" ];
updateScript = nix-update-script { };
};

meta = with lib; {
meta = {
description = "Scrollable-tiling Wayland compositor";
homepage = "https://github.com/YaLTeR/niri";
license = licenses.gpl3Only;
maintainers = with maintainers; [
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
iogamaster
foo-dogsquared
sodiboo
];
mainProgram = "niri";
platforms = platforms.linux;
platforms = lib.platforms.linux;
};
}

0 comments on commit f03374e

Please sign in to comment.