From ed3a3b00721774bbb6514fa8fa79e298d54b9fe5 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 14 Oct 2024 09:35:40 -0400 Subject: [PATCH] xwayland-satellite: 0.4 -> 0.4-unstable-2024-09-15 Diff: https://github.com/Supreeeme/xwayland-satellite/compare/v0.4...b962a0f33b503aa39c9cf6919f488b664e5b79b4 --- .../by-name/xw/xwayland-satellite/package.nix | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/pkgs/by-name/xw/xwayland-satellite/package.nix b/pkgs/by-name/xw/xwayland-satellite/package.nix index 21acf3a1373a..c862b91ca4a9 100644 --- a/pkgs/by-name/xw/xwayland-satellite/package.nix +++ b/pkgs/by-name/xw/xwayland-satellite/package.nix @@ -3,25 +3,31 @@ fetchFromGitHub, libxcb, makeWrapper, - nix-update-script, pkg-config, rustPlatform, + unstableGitUpdater, xcb-util-cursor, xwayland, + withSystemd ? true, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage { pname = "xwayland-satellite"; - version = "0.4"; + version = "0.4-unstable-2024-09-15"; src = fetchFromGitHub { owner = "Supreeeme"; repo = "xwayland-satellite"; - rev = "v${version}"; - hash = "sha256-dwF9nI54a6Fo9XU5s4qmvMXSgCid3YQVGxch00qEMvI="; + rev = "b962a0f33b503aa39c9cf6919f488b664e5b79b4"; + hash = "sha256-OANPb73V/RQDqtpIcbzeJ93KuOHKFQv+1xXC44Ut7tY="; }; - cargoHash = "sha256-nKPSkHbh73xKWNpN/OpDmLnVmA3uygs3a+ejOhwU3yA="; + postPatch = '' + substituteInPlace resources/xwayland-satellite.service \ + --replace-fail '/usr/local/bin' "$out/bin" + ''; + + cargoHash = "sha256-1EtwGMoLfYK0VZj8jdQiweO/RHGBzyEoeMEI4pmqfu8="; nativeBuildInputs = [ makeWrapper @@ -34,23 +40,22 @@ rustPlatform.buildRustPackage rec { xcb-util-cursor ]; - # disable Xwayland integration tests which need a running display server - checkFlags = [ - "--exact" - "--skip=copy_from_wayland" - "--skip=copy_from_x11" - "--skip=input_focus" - "--skip=quick_delete" - "--skip=reparent" - "--skip=toplevel_flow" - ]; + buildNoDefaultFeatures = true; + buildFeatures = lib.optional withSystemd "systemd"; - postInstall = '' + # 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 + ''; + + postFixup = '' wrapProgram $out/bin/xwayland-satellite \ --prefix PATH : "${lib.makeBinPath [ xwayland ]}" ''; - passthru.updateScript = nix-update-script { }; + passthru.updateScript = unstableGitUpdater { tagPrefix = "v"; }; meta = with lib; { description = "Rootless Xwayland integration to any Wayland compositor implementing xdg_wm_base";