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/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 70fecb5f6a53..63dce6b4d56a 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1552,6 +1552,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 ef77b4d9f83f..905378f73d23 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29285,7 +29285,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 { @@ -30981,7 +30981,6 @@ with pkgs; super-productivity = callPackage ../applications/office/super-productivity { }; inherit (callPackages ../development/libraries/wlroots {}) - wlroots_0_16 wlroots_0_17 wlroots_0_18;