2024-08-11 14:28:30 +00:00
|
|
|
{
|
|
|
|
alsa-lib,
|
|
|
|
dbus,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fontconfig,
|
|
|
|
lib,
|
2024-08-18 12:39:20 +00:00
|
|
|
libGL,
|
|
|
|
libuuid,
|
2024-08-11 14:28:30 +00:00
|
|
|
libX11,
|
|
|
|
libXext,
|
|
|
|
libXrandr,
|
|
|
|
libxkbcommon,
|
|
|
|
makeWrapper,
|
|
|
|
nix-update-script,
|
|
|
|
openvr,
|
|
|
|
openxr-loader,
|
|
|
|
pipewire,
|
|
|
|
pkg-config,
|
|
|
|
pulseaudio,
|
|
|
|
rustPlatform,
|
|
|
|
shaderc,
|
|
|
|
stdenv,
|
|
|
|
testers,
|
2024-08-18 12:39:20 +00:00
|
|
|
vulkan-loader,
|
2024-08-11 14:28:30 +00:00
|
|
|
wayland,
|
|
|
|
wlx-overlay-s,
|
2024-03-01 21:00:58 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "wlx-overlay-s";
|
2024-10-01 19:22:27 +00:00
|
|
|
version = "0.6";
|
2024-03-01 21:00:58 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "galister";
|
|
|
|
repo = "wlx-overlay-s";
|
|
|
|
rev = "v${version}";
|
2024-10-01 19:22:27 +00:00
|
|
|
hash = "sha256-Gk/3m4eWFZqeQBphBUTGAUqe8SspXqut8n4JM8tTe6o=";
|
2024-03-01 21:00:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-08-04 19:40:22 +00:00
|
|
|
"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=";
|
2024-10-01 19:22:27 +00:00
|
|
|
"vulkano-0.34.0" = "sha256-0ZIxU2oItT35IFnS0YTVNmM775x21gXOvaahg/B9sj8=";
|
2024-09-23 22:36:30 +00:00
|
|
|
"wlx-capture-0.3.12" = "sha256-32WnAnNUSfsAA8WB9da3Wqb4acVlXh6HWsY9tPzCHEE=";
|
2024-03-01 21:00:58 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.bindgenHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
dbus
|
|
|
|
fontconfig
|
|
|
|
libxkbcommon
|
|
|
|
openvr
|
|
|
|
openxr-loader
|
|
|
|
pipewire
|
2024-08-11 14:28:30 +00:00
|
|
|
libX11
|
|
|
|
libXext
|
|
|
|
libXrandr
|
2024-03-01 21:00:58 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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 \
|
2024-08-18 12:39:20 +00:00
|
|
|
--add-needed ${lib.getLib libxkbcommon}/lib/libxkbcommon.so.0 \
|
|
|
|
--add-needed ${lib.getLib libGL}/lib/libEGL.so.1 \
|
|
|
|
--add-needed ${lib.getLib libGL}/lib/libGL.so.1 \
|
|
|
|
--add-needed ${lib.getLib vulkan-loader}/lib/libvulkan.so.1 \
|
|
|
|
--add-needed ${lib.getLib libuuid}/lib/libuuid.so.1
|
2024-03-01 21:00:58 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-08 07:23:38 +00:00
|
|
|
passthru = {
|
|
|
|
tests.testVersion = testers.testVersion { package = wlx-overlay-s; };
|
|
|
|
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
};
|
|
|
|
|
2024-06-08 07:19:36 +00:00
|
|
|
meta = {
|
2024-03-01 21:00:58 +00:00
|
|
|
description = "Wayland/X11 desktop overlay for SteamVR and OpenXR, Vulkan edition";
|
|
|
|
homepage = "https://github.com/galister/wlx-overlay-s";
|
2024-06-08 07:19:36 +00:00
|
|
|
license = lib.licenses.gpl3Only;
|
|
|
|
maintainers = with lib.maintainers; [ Scrumplex ];
|
|
|
|
platforms = lib.platforms.linux;
|
2024-09-24 15:50:49 +00:00
|
|
|
broken = stdenv.hostPlatform.isAarch64;
|
2024-03-01 21:00:58 +00:00
|
|
|
mainProgram = "wlx-overlay-s";
|
|
|
|
};
|
|
|
|
}
|