nix: build hyprland-share-picker

This commit is contained in:
Mihai Fufezan 2022-12-04 22:23:27 +02:00
parent 4cbddd34a1
commit 1d70c4600b
No known key found for this signature in database
GPG Key ID: 5899325F2F120900
2 changed files with 45 additions and 24 deletions

View File

@ -16,33 +16,37 @@
slurp,
systemd,
wayland,
src,
libsForQt5,
version ? "git",
}:
stdenv.mkDerivation {
pname = "xdg-desktop-portal-hyprland";
inherit version;
}: let
hyprland-share-picker = libsForQt5.callPackage ./hyprland-share-picker.nix {inherit version;};
in
stdenv.mkDerivation {
pname = "xdg-desktop-portal-hyprland";
inherit version;
src = ../.;
src = ../.;
strictDeps = true;
depsBuildBuild = [pkg-config];
nativeBuildInputs = [meson ninja pkg-config wayland-scanner makeWrapper];
buildInputs = [inih libdrm mesa pipewire systemd wayland wayland-protocols];
strictDeps = true;
depsBuildBuild = [pkg-config];
nativeBuildInputs = [meson ninja pkg-config wayland-scanner makeWrapper];
buildInputs = [inih libdrm mesa pipewire systemd wayland wayland-protocols];
mesonFlags = [
"-Dsd-bus-provider=libsystemd"
];
mesonFlags = [
"-Dsd-bus-provider=libsystemd"
];
postInstall = ''
wrapProgram $out/libexec/xdg-desktop-portal-hyprland --prefix PATH ":" ${lib.makeBinPath [grim slurp]}
'';
postInstall = ''
ln -s ${hyprland-share-picker.outPath}/bin $out/
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;
};
}
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;
};
}

View File

@ -0,0 +1,17 @@
{
stdenv,
lib,
cmake,
qtbase,
wrapQtAppsHook,
version ? "git",
...
}:
stdenv.mkDerivation {
pname = "hyprland-share-picker";
inherit version;
src = ../hyprland-share-picker;
nativeBuildInputs = [cmake wrapQtAppsHook];
buildInputs = [qtbase];
}