nixpkgs/pkgs/by-name/xw/xwayland-run/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.5 KiB
Nix
Raw Normal View History

2024-03-25 23:18:07 +00:00
{ fetchFromGitLab
2023-12-11 00:51:24 +00:00
, lib
, meson
, ninja
, python3
, weston
, xorg
, xwayland
2024-03-25 23:18:07 +00:00
, withCage ? false , cage
, withKwin ? false , kdePackages
, withMutter ? false, gnome
, withDbus ? withMutter , dbus # Since 0.0.3, mutter compositors run with their own DBUS sessions
2023-12-11 00:51:24 +00:00
}:
let
compositors = [ weston ]
++ lib.optional withCage cage
2024-03-25 23:18:07 +00:00
++ lib.optional withKwin kdePackages.kwin
++ lib.optional withMutter gnome.mutter ++ lib.optional withDbus dbus
2023-12-11 00:51:24 +00:00
;
in
python3.pkgs.buildPythonApplication rec {
pname = "xwayland-run";
2024-03-25 23:18:07 +00:00
version = "0.0.3";
2023-12-11 00:51:24 +00:00
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "ofourdan";
repo = "xwayland-run";
rev = version;
2024-03-25 23:18:07 +00:00
hash = "sha256-yYULbbcFDT1zRFn1UWS0dyuchGYnOZypDmxqc14RYF4=";
2023-12-11 00:51:24 +00:00
};
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;
};
}