From 68c7d64d1a3e01266645f0d9a5266fc8df7052c9 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 22 Sep 2024 09:14:20 +0300 Subject: [PATCH] waycorner: modernize derivation - Use `refs/tags/${version}` over ${version} - Get rid of nested `with lib;` - Remove redundant build input (tested build & functionality) - Update changelog link to use current ref --- pkgs/by-name/wa/waycorner/package.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/wa/waycorner/package.nix b/pkgs/by-name/wa/waycorner/package.nix index 0c850dfa4cfa..4ca5ca58b04c 100644 --- a/pkgs/by-name/wa/waycorner/package.nix +++ b/pkgs/by-name/wa/waycorner/package.nix @@ -9,33 +9,34 @@ rustPlatform.buildRustPackage rec { pname = "waycorner"; version = "0.2.3"; + src = fetchFromGitHub { owner = "AndreasBackx"; repo = "waycorner"; - rev = version; + rev = "refs/tags/${version}"; hash = "sha256-b8juIhJ3kh+NJc8RUVVoatqjWISSW0ir/vk2Dz/428Y="; }; + cargoHash = "sha256-LGxFRGzQ8jOfxT5di3+YGqfS5KM4+Br6KlTFpPbkJyU="; - buildInputs = [ - wayland - ]; + nativeBuildInputs = [ pkg-config makeWrapper ]; + postFixup = '' # the program looks for libwayland-client.so at runtime wrapProgram $out/bin/waycorner \ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ wayland ]} ''; - meta = with lib; { + meta = { description = "Hot corners for Wayland"; mainProgram = "waycorner"; - changelog = "https://github.com/AndreasBackx/waycorner/blob/main/CHANGELOG.md"; + changelog = "https://github.com/AndreasBackx/waycorner/blob/${version}/CHANGELOG.md"; homepage = "https://github.com/AndreasBackx/waycorner"; - platforms = platforms.linux; - license = licenses.mit; - maintainers = with maintainers; [ NotAShelf ]; + platforms = lib.platforms.linux; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ NotAShelf ]; }; }