From 4da382b6b59ca46ca7f00ec59dc6ca2929594019 Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 14 Jul 2024 09:18:58 +0100 Subject: [PATCH 1/2] cage: 0.1.5 -> 0.1.5-unstable-2024-07-29 Includes support for wlroots 0.17 and a fix for disabling XWayland. Issue asking for a release: https://github.com/cage-kiosk/cage/issues/337 Diff: https://github.com/cage-kiosk/cage/compare/v0.1.5...d3fb99d6654325ec46277cfdb589f89316bed701 --- .../window-managers/cage/default.nix | 22 ++++++++++++------ .../cage/inject-git-commit.patch | 23 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 pkgs/applications/window-managers/cage/inject-git-commit.patch diff --git a/pkgs/applications/window-managers/cage/default.nix b/pkgs/applications/window-managers/cage/default.nix index 73c9f7c4c511..9d22cefc461b 100644 --- a/pkgs/applications/window-managers/cage/default.nix +++ b/pkgs/applications/window-managers/cage/default.nix @@ -1,4 +1,5 @@ { lib, stdenv, fetchFromGitHub +, substituteAll , meson, ninja, pkg-config, wayland-scanner, scdoc, makeWrapper , wlroots, wayland, wayland-protocols, pixman, libxkbcommon, xcbutilwm , systemd, libGL, libX11, mesa @@ -8,15 +9,24 @@ stdenv.mkDerivation rec { pname = "cage"; - version = "0.1.5"; + version = "0.1.5-unstable-2024-07-29"; src = fetchFromGitHub { - owner = "Hjdskes"; + owner = "cage-kiosk"; repo = "cage"; - rev = "v${version}"; - hash = "sha256-Suq14YRw/MReDRvO/TQqjpZvpzAEDnHUyVbQj0BPT4c="; + rev = "d3fb99d6654325ec46277cfdb589f89316bed701"; + hash = "sha256-WP0rWO9Wbs/09wTY8IlIUybnVUnwiNdXD9JgsoVG4rM="; }; + patches = [ + # TODO: Remove on next stable release. + (substituteAll { + src = ./inject-git-commit.patch; + gitCommit = lib.substring 0 7 src.rev; + gitBranch = "master"; + }) + ]; + depsBuildBuild = [ pkg-config ]; @@ -29,9 +39,7 @@ stdenv.mkDerivation rec { systemd libGL libX11 ]; - mesonFlags = [ "-Dxwayland=${lib.boolToString (xwayland != null)}" ]; - - postFixup = lib.optionalString (xwayland != null) '' + postFixup = lib.optionalString wlroots.enableXWayland '' wrapProgram $out/bin/cage --prefix PATH : "${xwayland}/bin" ''; diff --git a/pkgs/applications/window-managers/cage/inject-git-commit.patch b/pkgs/applications/window-managers/cage/inject-git-commit.patch new file mode 100644 index 000000000000..b1c73f4a0761 --- /dev/null +++ b/pkgs/applications/window-managers/cage/inject-git-commit.patch @@ -0,0 +1,23 @@ +diff --git a/meson.build b/meson.build +index 4c0cbe280f..d4479741c8 100644 +--- a/meson.build ++++ b/meson.build +@@ -68,14 +68,12 @@ + + version = '@0@'.format(meson.project_version()) + git = find_program('git', native: true, required: false) +-if git.found() +- git_commit = run_command([git, 'rev-parse', '--short', 'HEAD'], check: false) +- git_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD'], check: false) +- if git_commit.returncode() == 0 and git_branch.returncode() == 0 ++if true ++ if true + version = '@0@-@1@ (branch \'@2@\')'.format( + meson.project_version(), +- git_commit.stdout().strip(), +- git_branch.stdout().strip(), ++ '@gitCommit@'.strip(), ++ '@gitBranch@'.strip(), + ) + endif + endif diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b210c70cadb0..32187e7c2ebd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29444,7 +29444,7 @@ with pkgs; cardo = callPackage ../data/fonts/cardo { }; cage = callPackage ../applications/window-managers/cage { - wlroots = wlroots_0_16; + wlroots = wlroots_0_17; }; calf = callPackage ../applications/audio/calf { From 9125c0b77b9d5cb7656e3bee38aee7a1899cc233 Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 14 Jul 2024 09:23:14 +0100 Subject: [PATCH 2/2] wlroots_0_16: drop No remaining users in the tree, and another FFmpeg 4 dependency vanquished. --- pkgs/development/libraries/wlroots/default.nix | 13 ------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 1 - 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/pkgs/development/libraries/wlroots/default.nix b/pkgs/development/libraries/wlroots/default.nix index 81b7b9140ae7..236865bae163 100644 --- a/pkgs/development/libraries/wlroots/default.nix +++ b/pkgs/development/libraries/wlroots/default.nix @@ -15,7 +15,6 @@ , mesa , xorg , libpng -, ffmpeg_4 , ffmpeg , hwdata , seatd @@ -113,18 +112,6 @@ let in rec { - wlroots_0_16 = generic { - version = "0.16.2"; - hash = "sha256-JeDDYinio14BOl6CbzAPnJDOnrk4vgGNMN++rcy2ItQ="; - postPatch = '' - substituteInPlace backend/drm/meson.build \ - --replace /usr/share/hwdata/ ${hwdata}/share/hwdata/ - ''; - extraBuildInputs = [ - ffmpeg_4 - ]; - }; - wlroots_0_17 = generic { version = "0.17.4"; hash = "sha256-AzmXf+HMX/6VAr0LpfHwfmDB9dRrrLQHt7l35K98MVo="; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index b944daf5ba40..d59ead7dc436 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1545,6 +1545,7 @@ mapAliases ({ wkhtmltopdf-bin = wkhtmltopdf; # Added 2024-07-17 wlroots_0_14 = throw "'wlroots_0_14' has been removed in favor of newer versions"; # Added 2023-07-29 wlroots_0_15 = throw "'wlroots_0_15' has been removed in favor of newer versions"; # Added 2024-03-28 + wlroots_0_16 = throw "'wlroots_0_16' has been removed in favor of newer versions"; # Added 2024-07-14 wlroots = wlroots_0_18; # wlroots is unstable, we must keep depending on 'wlroots_0_*', convert to package after a stable(1.x) release wordpress6_1 = throw "'wordpress6_1' has been removed in favor of the latest version"; # Added 2023-10-10 wordpress6_2 = throw "'wordpress6_2' has been removed in favor of the latest version"; # Added 2023-10-10 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 32187e7c2ebd..29dcbf3f8501 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31174,7 +31174,6 @@ with pkgs; super-productivity = callPackage ../applications/office/super-productivity { }; inherit (callPackages ../development/libraries/wlroots {}) - wlroots_0_16 wlroots_0_17 wlroots_0_18;