From cc6c3793221457904e72fb6e76ae3db2b5ed6462 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 22 Dec 2021 20:19:48 +0100 Subject: [PATCH 1/2] wlroots_0_14: init at 0.14.1 0.14.nix is an exact copy of default.nix. This no-op change is made in preparation of introducing wlroots 0.15.0 which would break most reverse-dependencies. --- pkgs/development/libraries/wlroots/0.14.nix | 63 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 6 +- 2 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/libraries/wlroots/0.14.nix diff --git a/pkgs/development/libraries/wlroots/0.14.nix b/pkgs/development/libraries/wlroots/0.14.nix new file mode 100644 index 0000000000000..cf188756ffdee --- /dev/null +++ b/pkgs/development/libraries/wlroots/0.14.nix @@ -0,0 +1,63 @@ +{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, wayland-scanner +, libGL, wayland, wayland-protocols, libinput, libxkbcommon, pixman +, xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa +, libpng, ffmpeg, xcbutilrenderutil, seatd + +, enableXWayland ? true, xwayland ? null +}: + +stdenv.mkDerivation rec { + pname = "wlroots"; + version = "0.14.1"; + + src = fetchFromGitHub { + owner = "swaywm"; + repo = "wlroots"; + rev = version; + sha256 = "1sshp3lvlkl1i670kxhwsb4xzxl8raz6769kqvgmxzcb63ns9ay1"; + }; + + # $out for the library and $examples for the example programs (in examples): + outputs = [ "out" "examples" ]; + + depsBuildBuild = [ pkg-config ]; + + nativeBuildInputs = [ meson ninja pkg-config wayland-scanner ]; + + buildInputs = [ + libGL wayland wayland-protocols libinput libxkbcommon pixman + xcbutilwm libX11 libcap xcbutilimage xcbutilerrors mesa + libpng ffmpeg xcbutilrenderutil seatd + ] + ++ lib.optional enableXWayland xwayland + ; + + mesonFlags = + lib.optional (!enableXWayland) "-Dxwayland=disabled" + ; + + postFixup = '' + # Install ALL example programs to $examples: + # screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle + # screenshot output-layout multi-pointer rotation tablet touch pointer + # simple + mkdir -p $examples/bin + cd ./examples + for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do + cp "$binary" "$examples/bin/wlroots-$binary" + done + ''; + + meta = with lib; { + description = "A modular Wayland compositor library"; + longDescription = '' + Pluggable, composable, unopinionated modules for building a Wayland + compositor; or about 50,000 lines of code you were going to write anyway. + ''; + inherit (src.meta) homepage; + changelog = "https://github.com/swaywm/wlroots/releases/tag/${version}"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ primeos synthetica ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2a2c504c2a237..b76439aaa7487 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26071,12 +26071,12 @@ with pkgs; super-productivity = callPackage ../applications/office/super-productivity { }; - wlroots = callPackage ../development/libraries/wlroots { + wlroots = wlroots_0_14; + wlroots_0_12 = callPackage ../development/libraries/wlroots/0.12.nix {}; + wlroots_0_14 = callPackage ../development/libraries/wlroots/0.14.nix { inherit (xorg) xcbutilrenderutil; }; - wlroots_0_12 = callPackage ../development/libraries/wlroots/0.12.nix {}; - sway-unwrapped = callPackage ../applications/window-managers/sway { }; sway = callPackage ../applications/window-managers/sway/wrapper.nix { }; swaybg = callPackage ../applications/window-managers/sway/bg.nix { }; From 63d7ba609d5051bf6dea46002a87e7ea532c33b4 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sat, 18 Dec 2021 21:18:35 +0100 Subject: [PATCH 2/2] wlroots: 0.14.1 -> 0.15.0 Release notes: https://gitlab.freedesktop.org/wlroots/wlroots/-/tags/0.15.0 Only three reverse-dependencies are compatible with the new release so far. --- .../wlroots/{default.nix => 0.15.nix} | 19 ++++---- pkgs/top-level/all-packages.nix | 44 ++++++++++++++----- pkgs/top-level/python-packages.nix | 4 +- 3 files changed, 46 insertions(+), 21 deletions(-) rename pkgs/development/libraries/wlroots/{default.nix => 0.15.nix} (74%) diff --git a/pkgs/development/libraries/wlroots/default.nix b/pkgs/development/libraries/wlroots/0.15.nix similarity index 74% rename from pkgs/development/libraries/wlroots/default.nix rename to pkgs/development/libraries/wlroots/0.15.nix index cf188756ffdee..93ecf0bd3ab3b 100644 --- a/pkgs/development/libraries/wlroots/default.nix +++ b/pkgs/development/libraries/wlroots/0.15.nix @@ -1,20 +1,21 @@ -{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, wayland-scanner +{ lib, stdenv, fetchFromGitLab, meson_0_60, ninja, pkg-config, wayland-scanner , libGL, wayland, wayland-protocols, libinput, libxkbcommon, pixman , xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa -, libpng, ffmpeg, xcbutilrenderutil, seatd +, libpng, ffmpeg, xcbutilrenderutil, seatd, vulkan-loader, glslang , enableXWayland ? true, xwayland ? null }: stdenv.mkDerivation rec { pname = "wlroots"; - version = "0.14.1"; + version = "0.15.0"; - src = fetchFromGitHub { - owner = "swaywm"; + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "wlroots"; repo = "wlroots"; rev = version; - sha256 = "1sshp3lvlkl1i670kxhwsb4xzxl8raz6769kqvgmxzcb63ns9ay1"; + sha256 = "0wdzs0wpv61pxgy3mx3xjsndyfmbj30v47d3w9ymmnd4r479n41n"; }; # $out for the library and $examples for the example programs (in examples): @@ -22,12 +23,12 @@ stdenv.mkDerivation rec { depsBuildBuild = [ pkg-config ]; - nativeBuildInputs = [ meson ninja pkg-config wayland-scanner ]; + nativeBuildInputs = [ meson_0_60 ninja pkg-config wayland-scanner ]; buildInputs = [ libGL wayland wayland-protocols libinput libxkbcommon pixman xcbutilwm libX11 libcap xcbutilimage xcbutilerrors mesa - libpng ffmpeg xcbutilrenderutil seatd + libpng ffmpeg xcbutilrenderutil seatd vulkan-loader glslang ] ++ lib.optional enableXWayland xwayland ; @@ -55,7 +56,7 @@ stdenv.mkDerivation rec { compositor; or about 50,000 lines of code you were going to write anyway. ''; inherit (src.meta) homepage; - changelog = "https://github.com/swaywm/wlroots/releases/tag/${version}"; + changelog = "https://gitlab.freedesktop.org/wlroots/wlroots/-/tags/${version}"; license = licenses.mit; platforms = platforms.linux; maintainers = with maintainers; [ primeos synthetica ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b76439aaa7487..d25bc49889aa7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3586,7 +3586,9 @@ with pkgs; reg = callPackage ../tools/virtualization/reg { }; - river = callPackage ../applications/window-managers/river { }; + river = callPackage ../applications/window-managers/river { + wlroots = wlroots_0_14; + }; rmapi = callPackage ../applications/misc/remarkable/rmapi { }; @@ -24459,7 +24461,9 @@ with pkgs; cardboard = callPackage ../applications/window-managers/cardboard { }; - cage = callPackage ../applications/window-managers/cage { }; + cage = callPackage ../applications/window-managers/cage { + wlroots = wlroots_0_14; + }; calf = callPackage ../applications/audio/calf { inherit (gnome2) libglade; @@ -24866,7 +24870,9 @@ with pkgs; dyff = callPackage ../development/tools/dyff {}; - dwl = callPackage ../applications/window-managers/dwl { }; + dwl = callPackage ../applications/window-managers/dwl { + wlroots = wlroots_0_14; + }; dwm = callPackage ../applications/window-managers/dwm { # dwm is configured entirely through source modification. Allow users to @@ -26071,13 +26077,18 @@ with pkgs; super-productivity = callPackage ../applications/office/super-productivity { }; - wlroots = wlroots_0_14; + wlroots = wlroots_0_15; wlroots_0_12 = callPackage ../development/libraries/wlroots/0.12.nix {}; wlroots_0_14 = callPackage ../development/libraries/wlroots/0.14.nix { inherit (xorg) xcbutilrenderutil; }; + wlroots_0_15 = callPackage ../development/libraries/wlroots/0.15.nix { + inherit (xorg) xcbutilrenderutil; + }; - sway-unwrapped = callPackage ../applications/window-managers/sway { }; + sway-unwrapped = callPackage ../applications/window-managers/sway { + wlroots = wlroots_0_14; + }; sway = callPackage ../applications/window-managers/sway/wrapper.nix { }; swaybg = callPackage ../applications/window-managers/sway/bg.nix { }; swayidle = callPackage ../applications/window-managers/sway/idle.nix { }; @@ -26097,7 +26108,9 @@ with pkgs; wbg = callPackage ../applications/misc/wbg { }; - hikari = callPackage ../applications/window-managers/hikari { }; + hikari = callPackage ../applications/window-managers/hikari { + wlroots = wlroots_0_14; + }; i3 = callPackage ../applications/window-managers/i3 { xcb-util-cursor = if stdenv.isDarwin then xcb-util-cursor-HEAD else xcb-util-cursor; @@ -26161,7 +26174,9 @@ with pkgs; i3-wk-switch = callPackage ../applications/window-managers/i3/wk-switch.nix { }; - waybox = callPackage ../applications/window-managers/waybox { }; + waybox = callPackage ../applications/window-managers/waybox { + wlroots = wlroots_0_14; + }; workstyle = callPackage ../applications/window-managers/i3/workstyle.nix { }; @@ -26623,7 +26638,9 @@ with pkgs; lame = callPackage ../development/libraries/lame { }; - labwc = callPackage ../applications/window-managers/labwc { }; + labwc = callPackage ../applications/window-managers/labwc { + wlroots = wlroots_0_14; + }; larswm = callPackage ../applications/window-managers/larswm { }; @@ -29295,7 +29312,8 @@ with pkgs; wayfireApplications = wayfireApplications-unwrapped.withPlugins (plugins: [ plugins.wf-shell ]); inherit (wayfireApplications) wayfire wcm; wayfireApplications-unwrapped = recurseIntoAttrs ( - callPackage ../applications/window-managers/wayfire/applications.nix { } + (callPackage ../applications/window-managers/wayfire/applications.nix { }). + extend (_: _: { wlroots = wlroots_0_14; }) ); wayfirePlugins = recurseIntoAttrs ( callPackage ../applications/window-managers/wayfire/plugins.nix { @@ -29349,7 +29367,9 @@ with pkgs; electron = electron_14; }; - wio = callPackage ../applications/window-managers/wio { }; + wio = callPackage ../applications/window-managers/wio { + wlroots = wlroots_0_14; + }; whitebox-tools = callPackage ../applications/gis/whitebox-tools { inherit (darwin.apple_sdk.frameworks) Security; @@ -34030,7 +34050,9 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) DiskArbitration Foundation IOKit; }; - cagebreak = callPackage ../applications/window-managers/cagebreak { }; + cagebreak = callPackage ../applications/window-managers/cagebreak { + wlroots = wlroots_0_14; + }; psftools = callPackage ../os-specific/linux/psftools {}; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 92847fdacc612..2eaf8dcb757eb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8092,7 +8092,9 @@ in { pywizlight = callPackage ../development/python-modules/pywizlight { }; - pywlroots = callPackage ../development/python-modules/pywlroots { }; + pywlroots = callPackage ../development/python-modules/pywlroots { + wlroots = pkgs.wlroots_0_14; + }; pyxattr = callPackage ../development/python-modules/pyxattr { };