3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/desktops/gnome-3/core/mutter/default.nix

156 lines
3 KiB
Nix
Raw Normal View History

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
, gnome-settings-daemon
, xorgserver
, python3
, wrapGAppsHook
2019-09-09 20:47:10 +01:00
, sysprof
, desktop-file-utils
, libcap_ng
, egl-wayland
, graphene
, wayland-protocols
}:
stdenv.mkDerivation rec {
2019-04-18 09:29:48 +01:00
pname = "mutter";
version = "3.36.0";
2019-07-04 13:32:34 +01:00
outputs = [ "out" "dev" "man" ];
src = fetchurl {
2019-04-18 09:29:48 +01:00
url = "mirror://gnome/sources/mutter/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "18lvj158w6gwc6xpvn699v8ykh1r5szry7sqascl6f1i8g628v2x";
};
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
"-Dwayland_eglstream=true"
"-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
];
propagatedBuildInputs = [
# required for pkgconfig to detect mutter-clutter
json-glib
2019-12-04 21:23:14 +00:00
libXtst
libcap_ng
graphene
];
nativeBuildInputs = [
2019-12-04 21:23:14 +00:00
desktop-file-utils
gettext
2019-12-04 21:23:14 +00:00
meson
ninja
2019-12-04 21:23:14 +00:00
pkgconfig
python3
wrapGAppsHook
2019-12-04 21:23:14 +00:00
xorgserver # for cvt command
];
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
wayland-protocols
2017-12-17 00:22:42 +00:00
];
2019-04-01 00:31:17 +01:00
patches = [
# 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-04-01 00:31:17 +01:00
(substituteAll {
src = ./fix-paths.patch;
inherit zenity;
})
# 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
];
postPatch = ''
patchShebangs src/backends/native/gen-default-modes.py
'';
postInstall = ''
${glib.dev}/bin/glib-compile-schemas "$out/share/glib-2.0/schemas"
'';
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
};
};
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;
};
}