Skip to content

Commit

Permalink
waycorner: modernize derivation
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
NotAShelf committed Sep 22, 2024
1 parent c4045a5 commit 68c7d64
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions pkgs/by-name/wa/waycorner/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
};
}

0 comments on commit 68c7d64

Please sign in to comment.