2019-12-04 21:23:14 +00:00
|
|
|
{ fetchurl
|
|
|
|
, fetchpatch
|
|
|
|
, substituteAll
|
|
|
|
, stdenv
|
|
|
|
, pkgconfig
|
|
|
|
, gnome3
|
|
|
|
, gettext
|
|
|
|
, gobject-introspection
|
|
|
|
, upower
|
|
|
|
, cairo
|
|
|
|
, pango
|
|
|
|
, cogl
|
|
|
|
, json-glib
|
|
|
|
, libstartup_notification
|
|
|
|
, zenity
|
|
|
|
, libcanberra-gtk3
|
|
|
|
, ninja
|
|
|
|
, xkeyboard_config
|
|
|
|
, libxkbfile
|
|
|
|
, libxkbcommon
|
|
|
|
, libXtst
|
|
|
|
, libinput
|
|
|
|
, gsettings-desktop-schemas
|
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, gnome-desktop
|
|
|
|
, geocode-glib
|
|
|
|
, pipewire
|
|
|
|
, libgudev
|
|
|
|
, libwacom
|
|
|
|
, xwayland
|
|
|
|
, meson
|
2019-03-03 18:30:10 +00:00
|
|
|
, gnome-settings-daemon
|
|
|
|
, xorgserver
|
|
|
|
, python3
|
|
|
|
, wrapGAppsHook
|
2019-09-09 20:47:10 +01:00
|
|
|
, sysprof
|
|
|
|
, desktop-file-utils
|
2019-10-19 14:15:20 +01:00
|
|
|
, libcap_ng
|
2019-09-27 22:31:31 +01:00
|
|
|
, egl-wayland
|
2019-12-18 14:01:33 +00:00
|
|
|
, graphene
|
|
|
|
, wayland-protocols
|
2019-03-03 18:30:10 +00:00
|
|
|
}:
|
2016-09-18 20:35:23 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-04-18 09:29:48 +01:00
|
|
|
pname = "mutter";
|
2019-12-18 14:01:33 +00:00
|
|
|
version = "3.36.0";
|
2018-02-25 20:07:20 +00:00
|
|
|
|
2019-07-04 13:32:34 +01:00
|
|
|
outputs = [ "out" "dev" "man" ];
|
|
|
|
|
2018-02-25 20:07:20 +00:00
|
|
|
src = fetchurl {
|
2019-04-18 09:29:48 +01:00
|
|
|
url = "mirror://gnome/sources/mutter/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2019-12-18 14:01:33 +00:00
|
|
|
sha256 = "18lvj158w6gwc6xpvn699v8ykh1r5szry7sqascl6f1i8g628v2x";
|
2018-02-25 20:07:20 +00:00
|
|
|
};
|
|
|
|
|
2019-03-03 18:30:10 +00:00
|
|
|
mesonFlags = [
|
2019-12-04 21:23:14 +00:00
|
|
|
"-Degl_device=true"
|
2019-07-04 13:32:25 +01:00
|
|
|
"-Dinstalled_tests=false" # TODO: enable these
|
2019-09-27 22:31:31 +01:00
|
|
|
"-Dwayland_eglstream=true"
|
2019-12-18 14:01:33 +00:00
|
|
|
"-Dprofiler=true"
|
|
|
|
"-Dxwayland_path=${xwayland}/bin/Xwayland"
|
|
|
|
# This should be auto detected, but it looks like it manages a false
|
|
|
|
# positive.
|
|
|
|
"-Dxwayland_initfd=disabled"
|
2017-11-03 22:30:56 +00:00
|
|
|
];
|
2016-09-18 20:35:23 +01:00
|
|
|
|
2017-06-25 17:59:23 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
# required for pkgconfig to detect mutter-clutter
|
2019-10-19 14:03:17 +01:00
|
|
|
json-glib
|
2019-12-04 21:23:14 +00:00
|
|
|
libXtst
|
2019-10-19 14:15:20 +01:00
|
|
|
libcap_ng
|
2019-12-18 14:01:33 +00:00
|
|
|
graphene
|
2017-06-25 17:59:23 +01:00
|
|
|
];
|
|
|
|
|
2019-03-03 18:30:10 +00:00
|
|
|
nativeBuildInputs = [
|
2019-12-04 21:23:14 +00:00
|
|
|
desktop-file-utils
|
2019-03-03 18:30:10 +00:00
|
|
|
gettext
|
2019-12-04 21:23:14 +00:00
|
|
|
meson
|
2019-03-03 18:30:10 +00:00
|
|
|
ninja
|
2019-12-04 21:23:14 +00:00
|
|
|
pkgconfig
|
2019-03-03 18:30:10 +00:00
|
|
|
python3
|
|
|
|
wrapGAppsHook
|
2019-12-04 21:23:14 +00:00
|
|
|
xorgserver # for cvt command
|
2019-03-03 18:30:10 +00:00
|
|
|
];
|
2017-11-03 21:48:50 +00:00
|
|
|
|
2019-02-13 21:47:50 +00:00
|
|
|
buildInputs = [
|
2019-12-04 21:23:14 +00:00
|
|
|
cairo
|
|
|
|
cogl
|
|
|
|
egl-wayland
|
|
|
|
geocode-glib
|
|
|
|
glib
|
|
|
|
gnome-desktop
|
|
|
|
gnome-settings-daemon
|
|
|
|
gobject-introspection
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
gtk3
|
|
|
|
libcanberra-gtk3
|
|
|
|
libgudev
|
|
|
|
libinput
|
|
|
|
libstartup_notification
|
|
|
|
libwacom
|
|
|
|
libxkbcommon
|
|
|
|
libxkbfile
|
|
|
|
pango
|
|
|
|
pipewire
|
|
|
|
sysprof
|
|
|
|
upower
|
|
|
|
xkeyboard_config
|
|
|
|
xwayland
|
|
|
|
zenity
|
|
|
|
zenity
|
2019-12-18 14:01:33 +00:00
|
|
|
wayland-protocols
|
2017-12-17 00:22:42 +00:00
|
|
|
];
|
2016-09-18 20:35:23 +01:00
|
|
|
|
2019-04-01 00:31:17 +01:00
|
|
|
patches = [
|
2019-10-19 14:15:20 +01:00
|
|
|
# Drop inheritable cap_sys_nice, to prevent the ambient set from leaking
|
|
|
|
# from mutter/gnome-shell, see https://github.com/NixOS/nixpkgs/issues/71381
|
|
|
|
./drop-inheritable.patch
|
2019-12-04 21:51:56 +00:00
|
|
|
|
2019-04-01 00:31:17 +01:00
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit zenity;
|
|
|
|
})
|
2019-12-18 14:01:33 +00:00
|
|
|
|
|
|
|
# Fix crash when opening submenus from «always on visible workspace» windows
|
|
|
|
# https://gitlab.gnome.org/GNOME/mutter/issues/1083
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/mutter/commit/7e32cc05ce2e5b3931ddcf46ce9ead603a0de39e.patch";
|
|
|
|
sha256 = "5ZzOMizucfrSnHNYjHIUObLHCvAIjrE6fY/CxLp4c7k=";
|
|
|
|
})
|
2019-04-01 00:31:17 +01:00
|
|
|
];
|
|
|
|
|
2019-03-03 18:30:10 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs src/backends/native/gen-default-modes.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
${glib.dev}/bin/glib-compile-schemas "$out/share/glib-2.0/schemas"
|
2016-09-18 20:35:23 +01:00
|
|
|
'';
|
|
|
|
|
2019-02-13 21:47:50 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
2019-12-04 21:23:14 +00:00
|
|
|
packageName = pname;
|
|
|
|
attrPath = "gnome3.${pname}";
|
2019-02-13 21:47:50 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-09-18 20:35:23 +01:00
|
|
|
meta = with stdenv.lib; {
|
2019-12-04 21:23:14 +00:00
|
|
|
description = "A window manager for GNOME";
|
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/mutter";
|
2017-12-17 00:22:42 +00:00
|
|
|
license = licenses.gpl2;
|
2019-12-04 21:23:14 +00:00
|
|
|
maintainers = gnome3.maintainers;
|
|
|
|
platforms = platforms.linux;
|
2016-09-18 20:35:23 +01:00
|
|
|
};
|
|
|
|
}
|