about summary refs log tree commit diff
path: root/overlays/patches/nixpkgs-wayland/pkgs/xdg-desktop-portal-wlr/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/patches/nixpkgs-wayland/pkgs/xdg-desktop-portal-wlr/default.nix')
-rw-r--r--overlays/patches/nixpkgs-wayland/pkgs/xdg-desktop-portal-wlr/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/overlays/patches/nixpkgs-wayland/pkgs/xdg-desktop-portal-wlr/default.nix b/overlays/patches/nixpkgs-wayland/pkgs/xdg-desktop-portal-wlr/default.nix
new file mode 100644
index 000000000000..a0463240144a
--- /dev/null
+++ b/overlays/patches/nixpkgs-wayland/pkgs/xdg-desktop-portal-wlr/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub
+, meson, ninja, pkgconfig
+, systemd, wayland, wayland-protocols
+, pipewire, libdrm
+}:
+
+let
+  metadata = import ./metadata.nix;
+in
+stdenv.mkDerivation rec {
+  name = "xdg-desktop-portal-wlr-${version}";
+  version = metadata.rev;
+
+  src = fetchFromGitHub {
+    owner = "emersion";
+    repo = "xdg-desktop-portal-wlr";
+    rev = version;
+    sha256 = metadata.sha256;
+  };
+
+  nativeBuildInputs = [ pkgconfig meson ninja ];
+  buildInputs = [ systemd wayland wayland-protocols pipewire libdrm ];
+  mesonFlags = [ "-Dauto_features=enabled" ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "xdg-desktop-portal backend for wlroots";
+    homepage    = "https://github.com/emersion/xdg-desktop-portal-wlr";
+    license     = licenses.mit;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ colemickens ];
+  };
+}