xdg-desktop-portal-hyprland/nix/default.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

2022-12-04 00:44:12 +01:00
{
lib,
stdenv,
fetchpatch,
makeWrapper,
meson,
ninja,
pkg-config,
wayland-protocols,
wayland-scanner,
grim,
inih,
libdrm,
mesa,
pipewire,
slurp,
systemd,
wayland,
2022-12-04 21:23:27 +01:00
libsForQt5,
2022-12-04 00:44:12 +01:00
version ? "git",
2022-12-04 21:23:27 +01:00
}: let
hyprland-share-picker = libsForQt5.callPackage ./hyprland-share-picker.nix {inherit version;};
in
stdenv.mkDerivation {
pname = "xdg-desktop-portal-hyprland";
inherit version;
2022-12-04 00:44:12 +01:00
2022-12-04 21:23:27 +01:00
src = ../.;
2022-12-04 00:44:12 +01:00
2022-12-04 21:23:27 +01:00
strictDeps = true;
depsBuildBuild = [pkg-config];
nativeBuildInputs = [meson ninja pkg-config wayland-scanner makeWrapper];
buildInputs = [inih libdrm mesa pipewire systemd wayland wayland-protocols];
2022-12-04 00:44:12 +01:00
2022-12-04 21:23:27 +01:00
mesonFlags = [
"-Dsd-bus-provider=libsystemd"
];
2022-12-04 00:44:12 +01:00
2022-12-04 21:23:27 +01:00
postInstall = ''
ln -s ${hyprland-share-picker.outPath}/bin $out/
2022-12-04 00:44:12 +01:00
2022-12-04 21:23:27 +01:00
wrapProgram $out/libexec/xdg-desktop-portal-hyprland --prefix PATH ":" ${lib.makeBinPath [grim slurp]}
'';
meta = with lib; {
homepage = "https://github.com/emersion/xdg-desktop-portal-hyprland";
description = "xdg-desktop-portal backend for Hyprland";
maintainers = with maintainers; [fufexan];
platforms = platforms.linux;
license = licenses.mit;
};
}