diff options
author | Bobby Rong <rjl931189261@126.com> | 2023-08-17 15:43:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-17 15:43:43 +0800 |
commit | fd1f73aaa2a8134c1cbdd2514aa648330cc9a645 (patch) | |
tree | 165484e79dab5e5150adf0d3e9d3e757802c62b6 /pkgs/desktops/budgie | |
parent | d748e2356d014b49dfc696d3cc400275c36e556d (diff) | |
parent | 9325eefbdc3ab7810deff4bce53cc25a381d4aea (diff) |
Merge pull request #249312 from FedericoSchonborn/budgie/magpie
budgie.magpie: init at 0.9.2, replace Mutter with it on Budgie
Diffstat (limited to 'pkgs/desktops/budgie')
-rw-r--r-- | pkgs/desktops/budgie/budgie-control-center/default.nix | 5 | ||||
-rw-r--r-- | pkgs/desktops/budgie/budgie-desktop/default.nix | 18 | ||||
-rw-r--r-- | pkgs/desktops/budgie/budgie-gsettings-overrides/default.nix | 2 | ||||
-rw-r--r-- | pkgs/desktops/budgie/default.nix | 1 | ||||
-rw-r--r-- | pkgs/desktops/budgie/magpie/default.nix | 163 |
5 files changed, 184 insertions, 5 deletions
diff --git a/pkgs/desktops/budgie/budgie-control-center/default.nix b/pkgs/desktops/budgie/budgie-control-center/default.nix index 1a51c3dfc1f1..7c11fe7933e5 100644 --- a/pkgs/desktops/budgie/budgie-control-center/default.nix +++ b/pkgs/desktops/budgie/budgie-control-center/default.nix @@ -39,6 +39,7 @@ , libwacom , libxml2 , libxslt +, magpie , meson , modemmanager , networkmanager @@ -108,7 +109,6 @@ stdenv.mkDerivation rec { gnome.gnome-remote-desktop gnome.gnome-settings-daemon gnome.gnome-user-share - gnome.mutter gsettings-desktop-schemas gsound gtk3 @@ -126,6 +126,7 @@ stdenv.mkDerivation rec { libsecret libwacom libxml2 + magpie modemmanager networkmanager polkit @@ -158,7 +159,7 @@ stdenv.mkDerivation rec { --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share" --prefix XDG_DATA_DIRS : "${librsvg}/share" # WM keyboard shortcuts - --prefix XDG_DATA_DIRS : "${gnome.mutter}/share" + --prefix XDG_DATA_DIRS : "${magpie}/share" ) ''; diff --git a/pkgs/desktops/budgie/budgie-desktop/default.nix b/pkgs/desktops/budgie/budgie-desktop/default.nix index 787389c7576c..df6ba5d27797 100644 --- a/pkgs/desktops/budgie/budgie-desktop/default.nix +++ b/pkgs/desktops/budgie/budgie-desktop/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , accountsservice , alsa-lib , budgie-screensaver @@ -23,6 +24,7 @@ , libpulseaudio , libuuid , libwnck +, magpie , mesa , meson , ninja @@ -47,6 +49,20 @@ stdenv.mkDerivation rec { }; patches = [ + # Drop all Vapi files that are already included with Vala + # https://github.com/BuddiesOfBudgie/budgie-desktop/commit/5f641489a00cc244e50aa1ceae04f952d58389d2 + (fetchpatch { + url = "https://github.com/BuddiesOfBudgie/budgie-desktop/commit/5f641489a00cc244e50aa1ceae04f952d58389d2.patch"; + hash = "sha256-Cyj/+G1dx0DKCTtzVESzFZ+I5o7INopGvw7bq5o/abo="; + }) + + # Add support for Magpie + # https://github.com/BuddiesOfBudgie/budgie-desktop/pull/387 + (fetchpatch { + url = "https://github.com/BuddiesOfBudgie/budgie-desktop/commit/84ccb505160322536043717c3b8f970ab91b0103.patch"; + hash = "sha256-4nd7Tk4ajyVy8cGDNIINpW9jlyRNywPYMrhBCtJVHZk="; + }) + ./plugins.patch ]; @@ -70,7 +86,6 @@ stdenv.mkDerivation rec { gnome-menus gnome.gnome-bluetooth_1_0 gnome.gnome-settings-daemon - gnome.mutter gnome.zenity graphene gtk3 @@ -83,6 +98,7 @@ stdenv.mkDerivation rec { libpulseaudio libuuid libwnck + magpie mesa polkit sassc diff --git a/pkgs/desktops/budgie/budgie-gsettings-overrides/default.nix b/pkgs/desktops/budgie/budgie-gsettings-overrides/default.nix index 6516498dea89..411d8a1f6f63 100644 --- a/pkgs/desktops/budgie/budgie-gsettings-overrides/default.nix +++ b/pkgs/desktops/budgie/budgie-gsettings-overrides/default.nix @@ -3,7 +3,6 @@ , budgie-desktop , budgie-desktop-view , glib -, gnome , gsettings-desktop-schemas , mate , nixos-artwork @@ -57,7 +56,6 @@ let budgie-desktop budgie-desktop-view gsettings-desktop-schemas - gnome.mutter ] ++ extraGSettingsOverridePackages; in diff --git a/pkgs/desktops/budgie/default.nix b/pkgs/desktops/budgie/default.nix index afe954610fff..73eca3942023 100644 --- a/pkgs/desktops/budgie/default.nix +++ b/pkgs/desktops/budgie/default.nix @@ -8,4 +8,5 @@ lib.makeScope pkgs.newScope (self: with self; { budgie-desktop-with-plugins = callPackage ./budgie-desktop/wrapper.nix { }; budgie-gsettings-overrides = callPackage ./budgie-gsettings-overrides { }; budgie-screensaver = callPackage ./budgie-screensaver { }; + magpie = callPackage ./magpie { }; }) diff --git a/pkgs/desktops/budgie/magpie/default.nix b/pkgs/desktops/budgie/magpie/default.nix new file mode 100644 index 000000000000..15e59f801a23 --- /dev/null +++ b/pkgs/desktops/budgie/magpie/default.nix @@ -0,0 +1,163 @@ +{ fetchFromGitHub +, runCommand +, lib +, fetchpatch +, stdenv +, pkg-config +, gnome +, gettext +, gobject-introspection +, cairo +, colord +, lcms2 +, pango +, json-glib +, libstartup_notification +, libcanberra +, ninja +, xvfb-run +, xkeyboard_config +, libxcvt +, libxkbfile +, libXdamage +, libxkbcommon +, libXtst +, libinput +, libdrm +, gsettings-desktop-schemas +, glib +, gtk3 +, gnome-desktop +, pipewire +, libgudev +, libwacom +, mesa +, meson +, xorgserver +, python3 +, wrapGAppsHook +, gi-docgen +, sysprof +, libsysprof-capture +, desktop-file-utils +, libcap_ng +, graphene +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "magpie"; + version = "0.9.2"; + + outputs = [ "out" "dev" "devdoc" ]; + + src = fetchFromGitHub { + owner = "BuddiesOfBudgie"; + repo = "magpie"; + rev = "v${finalAttrs.version}"; + hash = "sha256-GoilHdESFgpwt8+Uqzrnf8jBpeaSak1uHTlkNcQdgtk="; + }; + + patches = [ + # Fix build with separate sysprof. + # https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2572 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/mutter/-/commit/285a5a4d54ca83b136b787ce5ebf1d774f9499d5.patch"; + sha256 = "/npUE3idMSTVlFptsDpZmGWjZ/d2gqruVlJKq4eF4xU="; + }) + ]; + + mesonFlags = [ + "-Degl_device=true" + "-Dprofiler=true" + "-Ddocs=true" + "-Dwith_shared_components=true" + ]; + + propagatedBuildInputs = [ + # required for pkg-config to detect magpie-clutter + json-glib + libXtst + libcap_ng + graphene + ]; + + nativeBuildInputs = [ + desktop-file-utils + gettext + libxcvt + mesa # needed for gbm + meson + ninja + xvfb-run + pkg-config + python3 + wrapGAppsHook + gi-docgen + xorgserver + ]; + + buildInputs = [ + cairo + glib + gnome-desktop + gnome.gnome-settings-daemon + gobject-introspection + gsettings-desktop-schemas + gtk3 + libcanberra + libdrm + libgudev + libinput + libstartup_notification + libwacom + libxkbcommon + libxkbfile + libXdamage + colord + lcms2 + pango + pipewire + sysprof # for D-Bus interfaces + libsysprof-capture + xkeyboard_config + ]; + + postPatch = '' + patchShebangs src/backends/native/gen-default-modes.py + # Magpie doesn't install any .desktop files + substituteInPlace meson/meson-postinstall.sh --replace "update-desktop-database" "# update-desktop-database" + ''; + + postFixup = '' + # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. + # TODO: Move this into a directory devhelp can find. + moveToOutput "share/magpie-0/doc" "$devdoc" + ''; + + # Install udev files into our own tree. + PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev"; + + separateDebugInfo = true; + + passthru = { + libdir = "${finalAttrs.finalPackage}/lib/magpie-0"; + + tests = { + libdirExists = runCommand "magpie-libdir-exists" {} '' + if [[ ! -d ${finalAttrs.finalPackage.libdir} ]]; then + echo "passthru.libdir should contain a directory, “${finalAttrs.finalPackage.libdir}” is not one." + exit 1 + fi + touch $out + ''; + }; + }; + + meta = with lib; { + description = "Softish fork of Mutter 43.x"; + homepage = "https://github.com/BuddiesOfBudgie/magpie"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ federicoschonborn ]; + platforms = platforms.linux; + }; +}) |