nixpkgs/pkgs/by-name/wl/wlx-overlay-s/package.nix
Sefa Eyeoglu 41908b4abb
wlx-overlay-s: format using nixfmt
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2024-08-12 23:04:07 +02:00

98 lines
2.2 KiB
Nix

{
alsa-lib,
dbus,
fetchFromGitHub,
fontconfig,
lib,
libX11,
libXext,
libXrandr,
libxkbcommon,
makeWrapper,
nix-update-script,
openvr,
openxr-loader,
pipewire,
pkg-config,
pulseaudio,
rustPlatform,
shaderc,
stdenv,
testers,
wayland,
wlx-overlay-s,
}:
rustPlatform.buildRustPackage rec {
pname = "wlx-overlay-s";
version = "0.4.4";
src = fetchFromGitHub {
owner = "galister";
repo = "wlx-overlay-s";
rev = "v${version}";
hash = "sha256-+pWhtaYOzh7LPSCQeUTlU+/IxtcQTqRci9X7xEUV18U=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"libmonado-rs-0.1.0" = "sha256-ja7OW/YSmfzaQoBhu6tec9v8fyNDknLekE2eY7McLPE=";
"openxr-0.18.0" = "sha256-ktkbhmExstkNJDYM/HYOwAwv3acex7P9SP0KMAOKhQk=";
"ovr_overlay-0.0.0" = "sha256-5IMEI0IPTacbA/1gibYU7OT6r+Bj+hlQjDZ3Kg0L2gw=";
"vulkano-0.34.0" = "sha256-o1KP/mscMG5j3U3xtei/2nMNEh7jLedcW1P0gL9Y1Rc=";
"wlx-capture-0.3.12" = "sha256-rZTJp7VhUvE/6lwESW2jKeGweFut6BvcxouG/nyl+GE=";
};
};
nativeBuildInputs = [
makeWrapper
pkg-config
rustPlatform.bindgenHook
];
buildInputs = [
alsa-lib
dbus
fontconfig
libxkbcommon
openvr
openxr-loader
pipewire
libX11
libXext
libXrandr
];
env.SHADERC_LIB_DIR = "${lib.getLib shaderc}/lib";
postPatch = ''
substituteAllInPlace src/res/watch.yaml \
--replace '"pactl"' '"${lib.getExe' pulseaudio "pactl"}"'
# TODO: src/res/keyboard.yaml references 'whisper_stt'
'';
postInstall = ''
patchelf $out/bin/wlx-overlay-s \
--add-needed ${lib.getLib wayland}/lib/libwayland-client.so.0 \
--add-needed ${lib.getLib libxkbcommon}/lib/libxkbcommon.so.0
'';
passthru = {
tests.testVersion = testers.testVersion { package = wlx-overlay-s; };
updateScript = nix-update-script { };
};
meta = {
description = "Wayland/X11 desktop overlay for SteamVR and OpenXR, Vulkan edition";
homepage = "https://github.com/galister/wlx-overlay-s";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ Scrumplex ];
platforms = lib.platforms.linux;
broken = stdenv.isAarch64;
mainProgram = "wlx-overlay-s";
};
}