diff options
Diffstat (limited to 'pkgs/desktops/pantheon/apps/switchboard-plugs')
16 files changed, 187 insertions, 116 deletions
diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/a11y/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/a11y/default.nix index bcb7c39d17b4c..152026e17a218 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/a11y/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/a11y/default.nix @@ -40,12 +40,6 @@ stdenv.mkDerivation rec { }) ]; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; - nativeBuildInputs = [ meson ninja @@ -61,6 +55,12 @@ stdenv.mkDerivation rec { wingpanel-indicator-a11y ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; + meta = with lib; { description = "Switchboard Universal Access Plug"; homepage = "https://github.com/elementary/switchboard-plug-a11y"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/about/add-wallpaper-option.patch b/pkgs/desktops/pantheon/apps/switchboard-plugs/about/add-wallpaper-option.patch new file mode 100644 index 0000000000000..657ea7a260c97 --- /dev/null +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/about/add-wallpaper-option.patch @@ -0,0 +1,82 @@ +From cc47fa33893e6840463ef8d59f9f4de4b7563726 Mon Sep 17 00:00:00 2001 +From: Bobby Rong <rjl931189261@126.com> +Date: Sat, 4 Dec 2021 22:00:38 +0800 +Subject: [PATCH] Add meson option for overlaying logo on wallpaper + +--- + meson.build | 8 ++++++++ + meson_options.txt | 1 + + src/Views/OperatingSystemView.vala | 8 ++++++++ + 3 files changed, 17 insertions(+) + create mode 100644 meson_options.txt + +diff --git a/meson.build b/meson.build +index 2125de6e..cbe3cadd 100644 +--- a/meson.build ++++ b/meson.build +@@ -20,6 +20,14 @@ add_project_arguments( + vapi_dir = join_paths(meson.current_source_dir(), 'vapi') + add_project_arguments(['--vapidir', vapi_dir], language: 'vala') + ++vala_flags = [] ++ ++if get_option('wallpaper') ++ vala_flags += ['--define', 'WALLPAPER'] ++endif ++ ++add_project_arguments(vala_flags, language: 'vala') ++ + subdir('data') + subdir('src') + subdir('po') +diff --git a/meson_options.txt b/meson_options.txt +new file mode 100644 +index 00000000..8cef0bb3 +--- /dev/null ++++ b/meson_options.txt +@@ -0,0 +1 @@ ++option('wallpaper', type : 'boolean', value : true, description : 'Overlay logo on default wallpaper') +diff --git a/src/Views/OperatingSystemView.vala b/src/Views/OperatingSystemView.vala +index fdb92e7e..6110d1aa 100644 +--- a/src/Views/OperatingSystemView.vala ++++ b/src/Views/OperatingSystemView.vala +@@ -39,6 +39,7 @@ public class About.OperatingSystemView : Gtk.Grid { + logo_icon_name = "distributor-logo"; + } + ++#if WALLPAPER + var logo = new Hdy.Avatar (128, "", false) { + // In case the wallpaper can't be loaded, we don't want an icon or text + icon_name = "invalid-icon-name", +@@ -53,6 +54,7 @@ public class About.OperatingSystemView : Gtk.Grid { + } + }); + logo.get_style_context ().add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); ++#endif + + var icon = new Gtk.Image () { + icon_name = logo_icon_name + "-symbolic", +@@ -64,9 +66,11 @@ public class About.OperatingSystemView : Gtk.Grid { + icon_style_context.add_class ("logo"); + icon_style_context.add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); + ++#if WALLPAPER + var logo_overlay = new Gtk.Overlay (); + logo_overlay.add (logo); + logo_overlay.add_overlay (icon); ++#endif + + // Intentionally not using GLib.OsInfoKey.PRETTY_NAME here because we + // want more granular control over text formatting +@@ -145,7 +149,11 @@ public class About.OperatingSystemView : Gtk.Grid { + valign = Gtk.Align.CENTER, + vexpand = true + }; ++#if WALLPAPER + software_grid.attach (logo_overlay, 0, 0, 1, 4); ++#else ++ software_grid.attach (icon, 0, 0, 1, 4); ++#endif + software_grid.attach (title, 1, 0, 3); + + software_grid.attach (kernel_version_label, 1, 2, 3); diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/about/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/about/default.nix index d48704736b1d6..82eece370dd8e 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/about/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/about/default.nix @@ -2,7 +2,6 @@ , stdenv , fetchFromGitHub , nix-update-script -, substituteAll , meson , ninja , pkg-config @@ -15,7 +14,6 @@ , switchboard , fwupd , appstream -, nixos-artwork }: stdenv.mkDerivation rec { @@ -29,11 +27,12 @@ stdenv.mkDerivation rec { sha256 = "0c075ac7iqz4hqbp2ph0cwyhiq0jn6c1g1jjfhygjbssv3vvd268"; }; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; + patches = [ + # Introduces a wallpaper meson flag. + # The wallpapaper path does not exist on NixOS, let's just remove the wallpaper. + # https://github.com/elementary/switchboard-plug-about/pull/236 + ./add-wallpaper-option.patch + ]; nativeBuildInputs = [ meson @@ -53,14 +52,17 @@ stdenv.mkDerivation rec { switchboard ]; - patches = [ - # Use NixOS's default wallpaper - (substituteAll { - src = ./fix-background-path.patch; - default_wallpaper = "${nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}"; - }) + mesonFlags = [ + # This option is introduced in add-wallpaper-option.patch + "-Dwallpaper=false" ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; + meta = with lib; { description = "Switchboard About Plug"; homepage = "https://github.com/elementary/switchboard-plug-about"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/about/fix-background-path.patch b/pkgs/desktops/pantheon/apps/switchboard-plugs/about/fix-background-path.patch deleted file mode 100644 index 6fea886913311..0000000000000 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/about/fix-background-path.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/Views/OperatingSystemView.vala b/src/Views/OperatingSystemView.vala -index fdb92e7e..4161538e 100644 ---- a/src/Views/OperatingSystemView.vala -+++ b/src/Views/OperatingSystemView.vala -@@ -47,7 +47,7 @@ public class About.OperatingSystemView : Gtk.Grid { - }; - logo.set_image_load_func ((size) => { - try { -- return new Gdk.Pixbuf.from_file_at_scale ("/usr/share/backgrounds/elementaryos-default", -1, size, true); -+ return new Gdk.Pixbuf.from_file_at_scale ("@default_wallpaper@", -1, size, true); - } catch (Error e) { - critical (e.message); - } diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/applications/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/applications/default.nix index d24b755026004..03fb7e9349bf1 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/applications/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/applications/default.nix @@ -24,12 +24,6 @@ stdenv.mkDerivation rec { sha256 = "18izmzhqp6x5ivha9yl8gyz9adyrsylw7w5p0cwm1bndgqbi7yh5"; }; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; - nativeBuildInputs = [ meson ninja @@ -45,6 +39,12 @@ stdenv.mkDerivation rec { switchboard ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; + meta = with lib; { description = "Switchboard Applications Plug"; homepage = "https://github.com/elementary/switchboard-plug-applications"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/bluetooth/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/bluetooth/default.nix index 764845c020223..53dc200a43459 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/bluetooth/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/bluetooth/default.nix @@ -35,12 +35,6 @@ stdenv.mkDerivation rec { }) ]; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; - nativeBuildInputs = [ meson ninja @@ -57,6 +51,12 @@ stdenv.mkDerivation rec { wingpanel-indicator-bluetooth # settings schema ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; + meta = with lib; { description = "Switchboard Bluetooth Plug"; homepage = "https://github.com/elementary/switchboard-plug-bluetooth"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/datetime/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/datetime/default.nix index 09717a584ce03..71bbda8edb177 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/datetime/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/datetime/default.nix @@ -27,12 +27,6 @@ stdenv.mkDerivation rec { sha256 = "10rqhxsqbl1xnz5n84d7m39c3vb71k153989xvyc55djia1wjx96"; }; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; - patches = [ (substituteAll { src = ./fix-paths.patch; @@ -61,6 +55,12 @@ stdenv.mkDerivation rec { switchboard ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; + meta = with lib; { description = "Switchboard Date & Time Plug"; homepage = "https://github.com/elementary/switchboard-plug-datetime"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/display/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/display/default.nix index c25188add4503..4a7ce6f6d46db 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/display/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/display/default.nix @@ -24,12 +24,6 @@ stdenv.mkDerivation rec { sha256 = "sha256-3sYZCazGnTjIi3Iry5673TMI13sD0GuY+46AK+NJH70="; }; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; - nativeBuildInputs = [ meson ninja @@ -45,6 +39,12 @@ stdenv.mkDerivation rec { switchboard ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; + meta = with lib; { description = "Switchboard Displays Plug"; homepage = "https://github.com/elementary/switchboard-plug-display"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/default.nix index 01a3da26b1d57..1118d52fb43c1 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/default.nix @@ -40,12 +40,6 @@ stdenv.mkDerivation rec { }) ]; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; - nativeBuildInputs = [ libxml2 meson @@ -67,6 +61,12 @@ stdenv.mkDerivation rec { switchboard ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; + meta = with lib; { description = "Switchboard Keyboard Plug"; homepage = "https://github.com/elementary/switchboard-plug-keyboard"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/mouse-touchpad/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/mouse-touchpad/default.nix index a765eca6de2db..2c9b3833a0cc8 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/mouse-touchpad/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/mouse-touchpad/default.nix @@ -29,11 +29,12 @@ stdenv.mkDerivation rec { sha256 = "0nqgbpk1knvbj5xa078i0ka6lzqmaaa873gwj3mhjr5q2gzkw7y5"; }; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; + patches = [ + (substituteAll { + src = ./fix-paths.patch; + touchegg = touchegg; + }) + ]; nativeBuildInputs = [ meson @@ -54,12 +55,11 @@ stdenv.mkDerivation rec { touchegg ]; - patches = [ - (substituteAll { - src = ./fix-paths.patch; - touchegg = touchegg; - }) - ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; meta = with lib; { description = "Switchboard Mouse & Touchpad Plug"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/network/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/network/default.nix index b88f3f72d035d..fbad5aa7a0120 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/network/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/network/default.nix @@ -18,20 +18,21 @@ stdenv.mkDerivation rec { pname = "switchboard-plug-network"; - version = "2.4.1"; + version = "2.4.2"; src = fetchFromGitHub { owner = "elementary"; repo = pname; rev = version; - sha256 = "0nqihsbrpjw4nx1c50g854bqybniw38adi78vzg8nyl6ikj2r0z4"; + sha256 = "sha256-CdSX4p98HQNC0VF5Ae/ZnDqm000+9KJ6JhQWhSHC4CI="; }; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; + patches = [ + (substituteAll { + src = ./fix-paths.patch; + inherit networkmanagerapplet; + }) + ]; nativeBuildInputs = [ meson @@ -49,12 +50,11 @@ stdenv.mkDerivation rec { switchboard ]; - patches = [ - (substituteAll { - src = ./fix-paths.patch; - inherit networkmanagerapplet; - }) - ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; meta = with lib; { description = "Switchboard Networking Plug"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/notifications/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/notifications/default.nix index fd5dfa3281040..f142b8e9bb9c1 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/notifications/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/notifications/default.nix @@ -34,12 +34,6 @@ stdenv.mkDerivation rec { }) ]; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; - nativeBuildInputs = [ meson ninja @@ -55,6 +49,12 @@ stdenv.mkDerivation rec { switchboard ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; + meta = with lib; { description = "Switchboard Notifications Plug"; homepage = "https://github.com/elementary/switchboard-plug-notifications"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/power/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/power/default.nix index 16ed92b45d2da..2a531815f8751 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/power/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/power/default.nix @@ -28,12 +28,6 @@ stdenv.mkDerivation rec { sha256 = "006h8mrhmdrbd83vhdyahgrfk9wh6j9kjincpp7dz7sl8fsyhmcr"; }; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; - nativeBuildInputs = [ meson ninja @@ -53,6 +47,12 @@ stdenv.mkDerivation rec { wingpanel-indicator-power # settings schema ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; + meta = with lib; { description = "Switchboard Power Plug"; homepage = "https://github.com/elementary/switchboard-plug-power"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/printers/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/printers/default.nix index dbca28038ab35..40b52affa0361 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/printers/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/printers/default.nix @@ -34,12 +34,6 @@ stdenv.mkDerivation rec { }) ]; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; - nativeBuildInputs = [ meson ninja @@ -55,6 +49,12 @@ stdenv.mkDerivation rec { switchboard ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; + meta = with lib; { description = "Switchboard Printers Plug"; homepage = "https://github.com/elementary/switchboard-plug-printers"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/sharing/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/sharing/default.nix index f41cfa2f74573..2a480bb9e257a 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/sharing/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/sharing/default.nix @@ -33,12 +33,6 @@ stdenv.mkDerivation rec { }) ]; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; - nativeBuildInputs = [ meson ninja @@ -53,6 +47,12 @@ stdenv.mkDerivation rec { switchboard ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; + meta = with lib; { description = "Switchboard Sharing Plug"; homepage = "https://github.com/elementary/switchboard-plug-sharing"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/wacom/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/wacom/default.nix index e31768c764d42..904278f983e03 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/wacom/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/wacom/default.nix @@ -37,12 +37,6 @@ stdenv.mkDerivation rec { }) ]; - passthru = { - updateScript = nix-update-script { - attrPath = "pantheon.${pname}"; - }; - }; - nativeBuildInputs = [ meson ninja @@ -62,6 +56,12 @@ stdenv.mkDerivation rec { xorg.libXi ]; + passthru = { + updateScript = nix-update-script { + attrPath = "pantheon.${pname}"; + }; + }; + meta = with lib; { description = "Switchboard Wacom Plug"; homepage = "https://github.com/elementary/switchboard-plug-wacom"; |