about summary refs log tree commit diff
path: root/pkgs/by-name/xw
diff options
context:
space:
mode:
authorarthsmn <arth.sh@proton.me>2023-12-10 21:51:24 -0300
committerarthsmn <arth.sh@proton.me>2023-12-18 16:44:05 -0300
commit15a643171de00bfcfba1d061e4ca62b1d2c4d15b (patch)
tree1ea96d6b4af8faef718120b6af38f102b92a7e70 /pkgs/by-name/xw
parent841dae2c78fefa4445fa7c53aee82f1e4e7bdafb (diff)
xwayland-run: init at 0.0.2
Diffstat (limited to 'pkgs/by-name/xw')
-rw-r--r--pkgs/by-name/xw/xwayland-run/package.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/by-name/xw/xwayland-run/package.nix b/pkgs/by-name/xw/xwayland-run/package.nix
new file mode 100644
index 0000000000000..580af8afa8d0f
--- /dev/null
+++ b/pkgs/by-name/xw/xwayland-run/package.nix
@@ -0,0 +1,58 @@
+{ cage
+, fetchFromGitLab
+, gnome
+, lib
+, meson
+, ninja
+, python3
+, weston
+, xorg
+, xwayland
+, withMutter ? false
+, withCage ? false
+}:
+let
+  compositors = [ weston ]
+    ++ lib.optional withMutter gnome.mutter
+    ++ lib.optional withCage cage
+  ;
+in
+python3.pkgs.buildPythonApplication rec {
+  pname = "xwayland-run";
+  version = "0.0.2";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "ofourdan";
+    repo = "xwayland-run";
+    rev = version;
+    hash = "sha256-+HdRLIizEdtKWD8HadQQf750e2t1AWa14U/Xwu3xPK4=";
+  };
+
+  pyproject = false;
+
+  outputs = [ "out" "man" ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+  ];
+
+
+  postInstall = ''
+    wrapProgram $out/bin/wlheadless-run \
+      --prefix PATH : ${lib.makeBinPath compositors}
+    wrapProgram $out/bin/xwayland-run \
+      --prefix PATH : ${lib.makeBinPath [ xwayland xorg.xauth ]}
+    wrapProgram $out/bin/xwfb-run \
+      --prefix PATH : ${lib.makeBinPath (compositors ++ [ xwayland xorg.xauth ])}
+  '';
+
+  meta = with lib; {
+    description = "A set of small utilities revolving around running Xwayland and various Wayland compositor headless";
+    homepage = "https://gitlab.freedesktop.org/ofourdan/xwayland-run";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ arthsmn ];
+    platforms = platforms.linux;
+  };
+}