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

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

76 lines
1.8 KiB
Nix
Raw Normal View History

2024-10-14 13:24:31 +00:00
{
lib,
fetchFromGitHub,
libxcb,
makeBinaryWrapper,
2024-10-14 13:24:31 +00:00
pkg-config,
rustPlatform,
unstableGitUpdater,
2024-10-14 13:24:31 +00:00
xcb-util-cursor,
xwayland,
withSystemd ? true,
2024-06-26 09:12:05 +00:00
}:
rustPlatform.buildRustPackage {
2024-06-26 09:12:05 +00:00
pname = "xwayland-satellite";
version = "0.4-unstable-2024-09-15";
2024-06-26 09:12:05 +00:00
src = fetchFromGitHub {
owner = "Supreeeme";
repo = "xwayland-satellite";
rev = "b962a0f33b503aa39c9cf6919f488b664e5b79b4";
hash = "sha256-OANPb73V/RQDqtpIcbzeJ93KuOHKFQv+1xXC44Ut7tY=";
2024-06-26 09:12:05 +00:00
};
postPatch = ''
substituteInPlace resources/xwayland-satellite.service \
--replace-fail '/usr/local/bin' "$out/bin"
'';
cargoHash = "sha256-1EtwGMoLfYK0VZj8jdQiweO/RHGBzyEoeMEI4pmqfu8=";
2024-06-26 09:12:05 +00:00
nativeBuildInputs = [
makeBinaryWrapper
2024-06-26 09:12:05 +00:00
pkg-config
rustPlatform.bindgenHook
];
buildInputs = [
libxcb
xcb-util-cursor
];
buildNoDefaultFeatures = true;
buildFeatures = lib.optional withSystemd "systemd";
# All integration tests require a running display server
doCheck = false;
postInstall = lib.optionalString withSystemd ''
install -Dm0644 resources/xwayland-satellite.service -t $out/lib/systemd/user
'';
2024-06-26 09:12:05 +00:00
postFixup = ''
wrapProgram $out/bin/xwayland-satellite \
2024-10-14 13:24:31 +00:00
--prefix PATH : "${lib.makeBinPath [ xwayland ]}"
'';
passthru.updateScript = unstableGitUpdater { tagPrefix = "v"; };
2024-06-26 09:12:05 +00:00
2024-10-14 13:48:31 +00:00
meta = {
description = "Xwayland outside your Wayland compositor";
longDescription = ''
Grants rootless Xwayland integration to any Wayland compositor implementing xdg_wm_base.
'';
2024-06-26 09:12:05 +00:00
homepage = "https://github.com/Supreeeme/xwayland-satellite";
2024-10-14 13:48:31 +00:00
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [
2024-10-14 13:24:31 +00:00
if-loop69420
sodiboo
getchoo
2024-10-14 13:24:31 +00:00
];
2024-06-26 09:12:05 +00:00
mainProgram = "xwayland-satellite";
2024-10-14 13:48:31 +00:00
platforms = lib.platforms.linux;
2024-06-26 09:12:05 +00:00
};
}