2022-12-04 00:44:12 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
2024-01-04 16:20:11 +01:00
|
|
|
cmake,
|
2022-12-04 00:44:12 +01:00
|
|
|
makeWrapper,
|
|
|
|
pkg-config,
|
2024-01-04 16:20:11 +01:00
|
|
|
wrapQtAppsHook,
|
|
|
|
hyprland,
|
|
|
|
hyprland-protocols,
|
2024-01-03 13:03:53 +01:00
|
|
|
hyprlang,
|
2024-09-20 16:27:10 +02:00
|
|
|
hyprutils,
|
|
|
|
hyprwayland-scanner,
|
2022-12-04 00:44:12 +01:00
|
|
|
libdrm,
|
|
|
|
mesa,
|
|
|
|
pipewire,
|
2023-09-09 20:55:23 +02:00
|
|
|
qtbase,
|
|
|
|
qttools,
|
|
|
|
qtwayland,
|
2024-01-04 16:20:11 +01:00
|
|
|
sdbus-cpp,
|
2023-09-06 20:36:48 +02:00
|
|
|
slurp,
|
2024-01-04 16:20:11 +01:00
|
|
|
systemd,
|
2022-12-04 00:44:12 +01:00
|
|
|
wayland,
|
2024-01-04 16:20:11 +01:00
|
|
|
wayland-protocols,
|
2024-09-20 16:27:10 +02:00
|
|
|
wayland-scanner,
|
2023-10-30 19:40:25 +01:00
|
|
|
debug ? false,
|
2022-12-04 00:44:12 +01:00
|
|
|
version ? "git",
|
2022-12-09 14:37:23 +01:00
|
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
2024-01-04 16:20:11 +01:00
|
|
|
pname = "xdg-desktop-portal-hyprland" + lib.optionalString debug "-debug";
|
2022-12-09 14:37:23 +01:00
|
|
|
inherit version;
|
2022-12-04 00:44:12 +01:00
|
|
|
|
2022-12-09 14:37:23 +01:00
|
|
|
src = ../.;
|
2022-12-04 00:44:12 +01:00
|
|
|
|
2024-09-01 17:13:39 +02:00
|
|
|
depsBuildBuild = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2023-04-10 13:51:52 +02:00
|
|
|
nativeBuildInputs = [
|
2024-01-04 16:20:11 +01:00
|
|
|
cmake
|
|
|
|
makeWrapper
|
2023-04-10 13:51:52 +02:00
|
|
|
pkg-config
|
2023-09-09 20:55:23 +02:00
|
|
|
wrapQtAppsHook
|
2024-09-20 16:27:10 +02:00
|
|
|
hyprwayland-scanner
|
2023-04-10 13:51:52 +02:00
|
|
|
];
|
2023-09-06 20:36:48 +02:00
|
|
|
|
2023-04-10 13:51:52 +02:00
|
|
|
buildInputs = [
|
|
|
|
hyprland-protocols
|
2024-01-04 16:20:11 +01:00
|
|
|
hyprlang
|
2024-09-20 16:27:10 +02:00
|
|
|
hyprutils
|
2023-04-10 13:51:52 +02:00
|
|
|
libdrm
|
|
|
|
mesa
|
|
|
|
pipewire
|
2023-09-09 20:55:23 +02:00
|
|
|
qtbase
|
|
|
|
qttools
|
|
|
|
qtwayland
|
2023-09-06 20:36:48 +02:00
|
|
|
sdbus-cpp
|
2023-04-10 13:51:52 +02:00
|
|
|
systemd
|
|
|
|
wayland
|
|
|
|
wayland-protocols
|
2024-09-20 16:27:10 +02:00
|
|
|
wayland-scanner
|
2023-04-10 13:51:52 +02:00
|
|
|
];
|
2022-12-04 22:12:57 +01:00
|
|
|
|
2024-06-17 12:12:54 +02:00
|
|
|
cmakeBuildType =
|
|
|
|
if debug
|
|
|
|
then "Debug"
|
|
|
|
else "RelWithDebInfo";
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
2023-09-09 20:55:23 +02:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2022-12-09 14:37:23 +01:00
|
|
|
postInstall = ''
|
2023-09-09 20:55:23 +02:00
|
|
|
wrapProgramShell $out/bin/hyprland-share-picker \
|
|
|
|
"''${qtWrapperArgs[@]}" \
|
|
|
|
--prefix PATH ":" ${lib.makeBinPath [slurp hyprland]}
|
|
|
|
|
|
|
|
wrapProgramShell $out/libexec/xdg-desktop-portal-hyprland \
|
|
|
|
--prefix PATH ":" ${lib.makeBinPath [(placeholder "out")]}
|
2022-12-09 14:37:23 +01:00
|
|
|
'';
|
2022-12-04 21:23:27 +01:00
|
|
|
|
2022-12-09 14:37:23 +01:00
|
|
|
meta = with lib; {
|
2022-12-11 18:03:28 +01:00
|
|
|
homepage = "https://github.com/hyprwm/xdg-desktop-portal-hyprland";
|
2022-12-09 14:37:23 +01:00
|
|
|
description = "xdg-desktop-portal backend for Hyprland";
|
2023-09-06 20:36:48 +02:00
|
|
|
license = licenses.bsd3;
|
2022-12-09 14:37:23 +01:00
|
|
|
maintainers = with maintainers; [fufexan];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|