From a9ec42c41bcf536deec16123a992baec87ba09d0 Mon Sep 17 00:00:00 2001 From: Mostly Void <7rat13@gmail.com> Date: Fri, 22 Jul 2022 10:42:09 +0530 Subject: [PATCH] waylevel: init at 1.0.0 use patchelf instead of wrapProgram for libpath --- pkgs/tools/misc/waylevel/default.nix | 31 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/tools/misc/waylevel/default.nix diff --git a/pkgs/tools/misc/waylevel/default.nix b/pkgs/tools/misc/waylevel/default.nix new file mode 100644 index 000000000000..f02ada3ab864 --- /dev/null +++ b/pkgs/tools/misc/waylevel/default.nix @@ -0,0 +1,31 @@ +{ lib +, fetchFromSourcehut +, makeWrapper +, rustPlatform +, wayland +}: +rustPlatform.buildRustPackage rec { + pname = "waylevel"; + version = "1.0.0"; + + src = fetchFromSourcehut { + owner = "~shinyzenith"; + repo = pname; + rev = version; + hash = "sha256-T2gqiRcKrKsvwGNnWrxR1Ga/VX4AyllYn1H25aIKt5s="; + }; + + cargoHash = "sha256-gw5m1/btJ5zZP04C7BCnHqEOUBoeu0whK8W7xA+xSQo="; + + postFixup = '' + patchelf --set-rpath ${lib.makeLibraryPath [wayland]} $out/bin/waylevel + ''; + + meta = with lib; { + description = "A tool to print wayland toplevels and other compositor info"; + homepage = "https://git.sr.ht/~shinyzenith/waylevel"; + license = licenses.bsd2; + maintainers = with maintainers; [ dit7ya ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 97690ce0b1f3..0d989fec399d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28127,6 +28127,8 @@ with pkgs; wayshot = callPackage ../tools/misc/wayshot { }; + waylevel = callPackage ../tools/misc/waylevel { }; + wbg = callPackage ../applications/misc/wbg { }; hikari = callPackage ../applications/window-managers/hikari {