git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #116544 from Synthetica9/sway-1.16

wlroots: 1.12 -> 1.13, sway: 1.5 -> 1.6

commit915e3fec91df63870d55c205de8da97026b284c3 authorMichael Weiss <dev.primeos@gmail.com> dateThu 8 Apr 2021, 17:53 (6 years ago) parent97cdea3f7aa41d
8 files changed+158−57
pkgs/applications/window-managers/dwl/default.nix+20−1 pkgs/applications/window-managers/labwc/default.nix+7−5 pkgs/applications/window-managers/sway/default.nix+5−4 pkgs/applications/window-managers/sway/load-configuration-from-etc.patch+22−16 pkgs/applications/window-managers/wayfire/applications.nix+13−16 pkgs/development/libraries/wlroots/0.12.nix+57 pkgs/development/libraries/wlroots/default.nix+5−5 pkgs/top-level/all-packages.nix+29−10
pkgs/applications/window-managers/dwl/default.nix+20−1
@@ -12,8 +12,27 @@
1212, patches ? [ ]
1313, conf ? null
1414, writeText
15+, fetchpatch
1516}:
1617
18+let
19+ # Add two patches to fix compile errors with wlroots 0.13:
20+ totalPatches = patches ++ [
21+ # Fix the renamed constant WLR_KEY_PRESSED => WL_KEYBOARD_KEY_STATE_PRESSED
22+ # https://github.com/djpohly/dwl/pull/66
23+ (fetchpatch {
24+ url = "https://github.com/djpohly/dwl/commit/a42613db9d9f6debfa4fb2363d75af9457d238ed.patch";
25+ sha256 = "0h76hx1fhazi07gqg7sljh13f91v6bvjy7m9qqmimhvqgfwdcc0j";
26+ })
27+ # Use the new signature for wlr_backend_autocreate, which removes an argument:
28+ # https://github.com/djpohly/dwl/pull/76
29+ (fetchpatch {
30+ url = "https://github.com/djpohly/dwl/commit/0ff13cf216056a36a261f4eed53c6a864989a9fb.patch";
31+ sha256 = "18clpdb4il1vxf1b0cx0qrwild68s9dism8ab66zpmvxs5qag2dm";
32+ })
33+ ];
34+in
35+
1736stdenv.mkDerivation rec {
1837 pname = "dwl";
1938 version = "0.2";
@@ -39,7 +58,7 @@ stdenv.mkDerivation rec {
3958 ];
4059
4160 # Allow users to set their own list of patches
42− inherit patches;
61+ patches = totalPatches;
4362
4463 # Last line of config.mk enables XWayland
4564 prePatch = lib.optionalString enable-xwayland ''
pkgs/applications/window-managers/labwc/default.nix+7−5
@@ -8,7 +8,6 @@
88, glib
99, libinput
1010, libxml2
11−, pandoc
1211, pango
1312, wayland
1413, wayland-protocols
@@ -16,20 +15,22 @@
1615, libxcb
1716, libxkbcommon
1817, xwayland
18+, libdrm
19+, scdoc
1920}:
2021
2122stdenv.mkDerivation rec {
2223 pname = "labwc";
23− version = "unstable-2021-02-06";
24+ version = "unstable-2021-03-15";
2425
2526 src = fetchFromGitHub {
2627 owner = "johanmalm";
2728 repo = pname;
28− rev = "4a8fcf5c6d0b730b1e2e17e544ce7d7d3c72cd13";
29− sha256 = "g1ba8dchUN393eis0VAu1bIjQfthDGLaSijSavz4lfU=";
29+ rev = "fddeb74527e5b860d9c1a91a237d390041c758b6";
30+ sha256 = "0rhniv5j4bypqxxj0nbpa3hclmn8znal9rldv0mrgbizn3wsbs54";
3031 };
3132
32− nativeBuildInputs = [ pkg-config meson ninja pandoc ];
33+ nativeBuildInputs = [ pkg-config meson ninja scdoc ];
3334 buildInputs = [
3435 cairo
3536 glib
@@ -42,6 +43,7 @@ stdenv.mkDerivation rec {
4243 libxcb
4344 libxkbcommon
4445 xwayland
46+ libdrm
4547 ];
4648
4749 mesonFlags = [ "-Dxwayland=enabled" ];
pkgs/applications/window-managers/sway/default.nix+5−4
@@ -2,18 +2,18 @@
22, meson, ninja, pkg-config, wayland, scdoc
33, libxkbcommon, pcre, json_c, dbus, libevdev
44, pango, cairo, libinput, libcap, pam, gdk-pixbuf, librsvg
5−, wlroots, wayland-protocols
5+, wlroots, wayland-protocols, libdrm
66}:
77
88stdenv.mkDerivation rec {
99 pname = "sway-unwrapped";
10− version = "1.5.1";
10+ version = "1.6";
1111
1212 src = fetchFromGitHub {
1313 owner = "swaywm";
1414 repo = "sway";
1515 rev = version;
16− sha256 = "1xsa3h8zhf29p0mi90baxpr76jkd9pd1gr97ky8cnjbcs4isj9j0";
16+ sha256 = "0vnplva11yafhbijrk68wy7pw0psn9jm0caaymswq1s951xsn1c8";
1717 };
1818
1919 patches = [
@@ -33,11 +33,12 @@ stdenv.mkDerivation rec {
3333 buildInputs = [
3434 wayland libxkbcommon pcre json_c dbus libevdev
3535 pango cairo libinput libcap pam gdk-pixbuf librsvg
36− wlroots wayland-protocols
36+ wlroots wayland-protocols libdrm
3737 ];
3838
3939 mesonFlags = [
4040 "-Ddefault-wallpaper=false"
41+ "-Dsd-bus-provider=libsystemd"
4142 ];
4243
4344 meta = with lib; {
pkgs/applications/window-managers/sway/load-configuration-from-etc.patch+22−16
@@ -1,22 +1,26 @@
1−From 26f9c65ef037892977a824f0d7d7111066856b53 Mon Sep 17 00:00:00 2001
2−From: Michael Weiss <dev.primeos@gmail.com>
3−Date: Sat, 27 Apr 2019 14:26:16 +0200
1+From 92283df3acbffa5c1bb21f23cdd686113d905114 Mon Sep 17 00:00:00 2001
2+From: Patrick Hilhorst <git@hilhorst.be>
3+Date: Wed, 31 Mar 2021 21:14:13 +0200
44Subject: [PATCH] Load configs from /etc but fallback to /nix/store
55
66This change will load all configuration files from /etc, to make it easy
77to override them, but fallback to /nix/store/.../etc/sway/config to make
88Sway work out-of-the-box with the default configuration on non NixOS
99systems.
10+
11+Original patch by Michael Weiss, updated for Sway 1.6 by Patrick Hilhorst
12+
13+Co-authored-by: Michael Weiss <dev.primeos@gmail.com>
1014---
1115 meson.build | 3 ++-
12− sway/config.c | 1 +
13− 2 files changed, 3 insertions(+), 1 deletion(-)
16+ sway/config.c | 3 ++-
17+ 2 files changed, 4 insertions(+), 2 deletions(-)
1418
1519diff --git a/meson.build b/meson.build
16−index 02b5d606..c03a9c0f 100644
20+index b7a29660..8ae8ceb3 100644
1721--- a/meson.build
1822+++ b/meson.build
19−@@ -129,7 +129,8 @@ if scdoc.found()
23+@@ -164,7 +164,8 @@ if scdoc.found()
2024 endforeach
2125 endif
2226
@@ -25,18 +29,20 @@ index 02b5d606..c03a9c0f 100644
2529+add_project_arguments('-DNIX_SYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c')
2630
2731 version = '"@0@"'.format(meson.project_version())
28− if git.found()
32+ git = find_program('git', native: true, required: false)
2933diff --git a/sway/config.c b/sway/config.c
30−index 4cd21bbc..dd855753 100644
34+index 76b9ec08..fb5b51aa 100644
3135--- a/sway/config.c
3236+++ b/sway/config.c
33−@@ -317,6 +317,7 @@ static char *get_config_path(void) {
34− "$XDG_CONFIG_HOME/i3/config",
35− SYSCONFDIR "/sway/config",
36− SYSCONFDIR "/i3/config",
37−+ NIX_SYSCONFDIR "/sway/config",
37+@@ -374,7 +374,8 @@ static char *get_config_path(void) {
38+ { .prefix = home, .config_folder = ".i3"},
39+ { .prefix = config_home, .config_folder = "i3"},
40+ { .prefix = SYSCONFDIR, .config_folder = "sway"},
41+- { .prefix = SYSCONFDIR, .config_folder = "i3"}
42++ { .prefix = SYSCONFDIR, .config_folder = "i3"},
43++ { .prefix = NIX_SYSCONFDIR, .config_folder = "sway"},
3844 };
3945
40− char *config_home = getenv("XDG_CONFIG_HOME");
46+ size_t num_config_paths = sizeof(config_paths)/sizeof(config_paths[0]);
4147--
42−2.19.2
48+2.30.1
pkgs/applications/window-managers/wayfire/applications.nix+13−16
@@ -1,23 +1,20 @@
1−{ newScope, wayfirePlugins }:
1+{ lib, newScope, wayfirePlugins }:
22
3−let
4− self = with self; {
5− inherit wayfirePlugins;
3+lib.makeExtensible (self: with self; {
4+ inherit wayfirePlugins;
65
7− callPackage = newScope self;
6+ callPackage = newScope self;
87
9− wayfire = callPackage ./. { };
8+ wayfire = callPackage ./. { };
109
11− wcm = callPackage ./wcm.nix {
12− inherit (wayfirePlugins) wf-shell;
13− };
10+ wcm = callPackage ./wcm.nix {
11+ inherit (wayfirePlugins) wf-shell;
12+ };
1413
15− wrapWayfireApplication = callPackage ./wrapper.nix { };
14+ wrapWayfireApplication = callPackage ./wrapper.nix { };
1615
17− withPlugins = selector: self // {
18− wayfire = wrapWayfireApplication wayfire selector;
19− wcm = wrapWayfireApplication wcm selector;
20− };
16+ withPlugins = selector: self // {
17+ wayfire = wrapWayfireApplication wayfire selector;
18+ wcm = wrapWayfireApplication wcm selector;
2119 };
22−in
23−self
20+})
pkgs/development/libraries/wlroots/0.12.nixnew file+57
@@ -0,0 +1,57 @@
1+{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, wayland
2+, libGL, wayland-protocols, libinput, libxkbcommon, pixman
3+, xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa
4+, libpng, ffmpeg
5+}:
6+
7+# Fixed version derivation.
8+# nixpkgs-update: no auto update
9+stdenv.mkDerivation rec {
10+ pname = "wlroots";
11+ version = "0.12.0";
12+
13+ src = fetchFromGitHub {
14+ owner = "swaywm";
15+ repo = "wlroots";
16+ rev = version;
17+ sha256 = "01j38lmgs2c6fq68v8b75pkilia2wsgzgp46ivfbi9hhx47kgcfn";
18+ };
19+
20+ # $out for the library and $examples for the example programs (in examples):
21+ outputs = [ "out" "examples" ];
22+
23+ nativeBuildInputs = [ meson ninja pkg-config wayland ];
24+
25+ buildInputs = [
26+ libGL wayland wayland-protocols libinput libxkbcommon pixman
27+ xcbutilwm libX11 libcap xcbutilimage xcbutilerrors mesa
28+ libpng ffmpeg
29+ ];
30+
31+ mesonFlags = [ "-Dlogind-provider=systemd" "-Dlibseat=disabled" ];
32+
33+ postFixup = ''
34+ # Install ALL example programs to $examples:
35+ # screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle
36+ # screenshot output-layout multi-pointer rotation tablet touch pointer
37+ # simple
38+ mkdir -p $examples/bin
39+ cd ./examples
40+ for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do
41+ cp "$binary" "$examples/bin/wlroots-$binary"
42+ done
43+ '';
44+
45+ meta = with lib; {
46+ description = "A modular Wayland compositor library";
47+ longDescription = ''
48+ Pluggable, composable, unopinionated modules for building a Wayland
49+ compositor; or about 50,000 lines of code you were going to write anyway.
50+ '';
51+ inherit (src.meta) homepage;
52+ changelog = "https://github.com/swaywm/wlroots/releases/tag/${version}";
53+ license = licenses.mit;
54+ platforms = platforms.linux;
55+ maintainers = with maintainers; [ primeos synthetica ];
56+ };
57+}
pkgs/development/libraries/wlroots/default.nix+5−5
@@ -1,18 +1,18 @@
11{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, wayland
22, libGL, wayland-protocols, libinput, libxkbcommon, pixman
33, xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa
4−, libpng, ffmpeg
4+, libpng, ffmpeg, libuuid, xcbutilrenderutil, xwayland
55}:
66
77stdenv.mkDerivation rec {
88 pname = "wlroots";
9− version = "0.12.0";
9+ version = "0.13.0";
1010
1111 src = fetchFromGitHub {
1212 owner = "swaywm";
1313 repo = "wlroots";
1414 rev = version;
15− sha256 = "01j38lmgs2c6fq68v8b75pkilia2wsgzgp46ivfbi9hhx47kgcfn";
15+ sha256 = "01plhbnsp5yg18arz0v8fr0pr9l4w4pdzwkg9px486qdvb3s1vgy";
1616 };
1717
1818 # $out for the library and $examples for the example programs (in examples):
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
2323 buildInputs = [
2424 libGL wayland wayland-protocols libinput libxkbcommon pixman
2525 xcbutilwm libX11 libcap xcbutilimage xcbutilerrors mesa
26− libpng ffmpeg
26+ libpng ffmpeg libuuid xcbutilrenderutil xwayland
2727 ];
2828
2929 mesonFlags = [ "-Dlogind-provider=systemd" "-Dlibseat=disabled" ];
@@ -50,6 +50,6 @@ stdenv.mkDerivation rec {
5050 changelog = "https://github.com/swaywm/wlroots/releases/tag/${version}";
5151 license = licenses.mit;
5252 platforms = platforms.linux;
53− maintainers = with maintainers; [ primeos ];
53+ maintainers = with maintainers; [ primeos synthetica ];
5454 };
5555}
pkgs/top-level/all-packages.nix+29−10
@@ -22051,7 +22051,9 @@ in
2205122051
2205222052 caerbannog = callPackage ../applications/misc/caerbannog { };
2205322053
22054− cage = callPackage ../applications/window-managers/cage { };
22054+ cage = callPackage ../applications/window-managers/cage {
22055+ wlroots = wlroots_0_12;
22056+ };
2205522057
2205622058 calf = callPackage ../applications/audio/calf {
2205722059 inherit (gnome2) libglade;
@@ -23490,7 +23492,11 @@ in
2349023492
2349123493 super-productivity = callPackage ../applications/networking/super-productivity { };
2349223494
23493− wlroots = callPackage ../development/libraries/wlroots { };
23495+ wlroots = callPackage ../development/libraries/wlroots {
23496+ inherit (xorg) xcbutilrenderutil;
23497+ };
23498+
23499+ wlroots_0_12 = callPackage ../development/libraries/wlroots/0.12.nix {};
2349423500
2349523501 sway-unwrapped = callPackage ../applications/window-managers/sway { };
2349623502 sway = callPackage ../applications/window-managers/sway/wrapper.nix { };
@@ -23512,7 +23518,9 @@ in
2351223518
2351323519 wbg = callPackage ../applications/misc/wbg { };
2351423520
23515− hikari = callPackage ../applications/window-managers/hikari { };
23521+ hikari = callPackage ../applications/window-managers/hikari {
23522+ wlroots = wlroots_0_12;
23523+ };
2351623524
2351723525 i3 = callPackage ../applications/window-managers/i3 {
2351823526 xcb-util-cursor = if stdenv.isDarwin then xcb-util-cursor-HEAD else xcb-util-cursor;
@@ -23574,7 +23582,9 @@ in
2357423582
2357523583 i3-wk-switch = callPackage ../applications/window-managers/i3/wk-switch.nix { };
2357623584
23577− waybox = callPackage ../applications/window-managers/waybox { };
23585+ waybox = callPackage ../applications/window-managers/waybox {
23586+ wlroots = wlroots_0_12;
23587+ };
2357823588
2357923589 windowchef = callPackage ../applications/window-managers/windowchef/default.nix { };
2358023590
@@ -26445,10 +26455,15 @@ in
2644526455
2644626456 wayfireApplications = wayfireApplications-unwrapped.withPlugins (plugins: [ plugins.wf-shell ]);
2644726457 inherit (wayfireApplications) wayfire wcm;
26448− wayfireApplications-unwrapped = recurseIntoAttrs (callPackage ../applications/window-managers/wayfire/applications.nix { });
26449− wayfirePlugins = recurseIntoAttrs (callPackage ../applications/window-managers/wayfire/plugins.nix {
26450− inherit (wayfireApplications-unwrapped) wayfire;
26451− });
26458+ wayfireApplications-unwrapped = recurseIntoAttrs (
26459+ (callPackage ../applications/window-managers/wayfire/applications.nix { }).
26460+ extend (_: _: { wlroots = wlroots_0_12; })
26461+ );
26462+ wayfirePlugins = recurseIntoAttrs (
26463+ callPackage ../applications/window-managers/wayfire/plugins.nix {
26464+ inherit (wayfireApplications-unwrapped) wayfire;
26465+ }
26466+ );
2645226467 wf-config = callPackage ../applications/window-managers/wayfire/wf-config.nix { };
2645326468
2645426469 waypipe = callPackage ../applications/networking/remote/waypipe { };
@@ -26490,7 +26505,9 @@ in
2649026505
2649126506 weston = callPackage ../applications/window-managers/weston { pipewire = pipewire_0_2; };
2649226507
26493− wio = callPackage ../applications/window-managers/wio { };
26508+ wio = callPackage ../applications/window-managers/wio {
26509+ wlroots = wlroots_0_12;
26510+ };
2649426511
2649526512 whitebox-tools = callPackage ../applications/gis/whitebox-tools {
2649626513 inherit (darwin.apple_sdk.frameworks) Security;
@@ -30819,7 +30836,9 @@ in
3081930836
3082030837 bottom = callPackage ../tools/system/bottom {};
3082130838
30822− cagebreak = callPackage ../applications/window-managers/cagebreak/default.nix {};
30839+ cagebreak = callPackage ../applications/window-managers/cagebreak/default.nix {
30840+ wlroots = wlroots_0_12;
30841+ };
3082330842
3082430843 psftools = callPackage ../os-specific/linux/psftools {};
3082530844