2019-12-04 21:23:14 +00:00
|
|
|
{ fetchurl
|
|
|
|
, substituteAll
|
2020-07-10 18:42:13 +01:00
|
|
|
, runCommand
|
2021-05-14 16:57:16 +01:00
|
|
|
, lib
|
|
|
|
, stdenv
|
2021-01-17 02:21:50 +00:00
|
|
|
, pkg-config
|
2021-05-07 22:18:14 +01:00
|
|
|
, gnome
|
2019-12-04 21:23:14 +00:00
|
|
|
, gettext
|
|
|
|
, gobject-introspection
|
|
|
|
, cairo
|
|
|
|
, pango
|
|
|
|
, json-glib
|
|
|
|
, libstartup_notification
|
|
|
|
, zenity
|
2020-07-13 09:13:31 +01:00
|
|
|
, libcanberra
|
2019-12-04 21:23:14 +00:00
|
|
|
, ninja
|
|
|
|
, xkeyboard_config
|
|
|
|
, libxkbfile
|
2021-04-12 05:07:42 +01:00
|
|
|
, libXdamage
|
2019-12-04 21:23:14 +00:00
|
|
|
, libxkbcommon
|
|
|
|
, libXtst
|
|
|
|
, libinput
|
2021-04-12 05:07:42 +01:00
|
|
|
, libdrm
|
2019-12-04 21:23:14 +00:00
|
|
|
, gsettings-desktop-schemas
|
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, gnome-desktop
|
|
|
|
, pipewire
|
|
|
|
, libgudev
|
|
|
|
, libwacom
|
|
|
|
, xwayland
|
2021-04-12 05:07:42 +01:00
|
|
|
, mesa
|
2019-12-04 21:23:14 +00:00
|
|
|
, meson
|
2019-03-03 18:30:10 +00:00
|
|
|
, gnome-settings-daemon
|
|
|
|
, xorgserver
|
|
|
|
, python3
|
|
|
|
, wrapGAppsHook
|
2020-11-08 15:19:00 +00:00
|
|
|
, sysprof
|
2019-09-09 20:47:10 +01:00
|
|
|
, 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
|
|
|
|
2020-07-10 18:42:13 +01:00
|
|
|
let self = stdenv.mkDerivation rec {
|
2019-04-18 09:29:48 +01:00
|
|
|
pname = "mutter";
|
2021-08-23 02:43:28 +01:00
|
|
|
version = "40.4";
|
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 {
|
2021-03-21 07:30:11 +00:00
|
|
|
url = "mirror://gnome/sources/mutter/${lib.versions.major version}/${pname}-${version}.tar.xz";
|
2021-08-23 02:43:28 +01:00
|
|
|
sha256 = "sha256-pxwVnNKshKZ32l+nrMSUg7Jifa13L4gPiJ645FMKHiM=";
|
2018-02-25 20:07:20 +00:00
|
|
|
};
|
|
|
|
|
2020-07-13 09:13:31 +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
|
2021-03-21 07:30:11 +00:00
|
|
|
# ./drop-inheritable.patch
|
2020-07-13 09:13:31 +01:00
|
|
|
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit zenity;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
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 = [
|
2021-01-17 02:21:50 +00:00
|
|
|
# required for pkg-config 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
|
2021-04-12 05:07:42 +01:00
|
|
|
mesa # needed for gbm
|
2019-12-04 21:23:14 +00:00
|
|
|
meson
|
2019-03-03 18:30:10 +00:00
|
|
|
ninja
|
2021-01-17 02:21:50 +00:00
|
|
|
pkg-config
|
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
|
|
|
|
egl-wayland
|
|
|
|
glib
|
|
|
|
gnome-desktop
|
|
|
|
gnome-settings-daemon
|
|
|
|
gobject-introspection
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
gtk3
|
2020-07-13 09:13:31 +01:00
|
|
|
libcanberra
|
2021-04-12 05:07:42 +01:00
|
|
|
libdrm
|
2019-12-04 21:23:14 +00:00
|
|
|
libgudev
|
|
|
|
libinput
|
|
|
|
libstartup_notification
|
|
|
|
libwacom
|
|
|
|
libxkbcommon
|
|
|
|
libxkbfile
|
2021-04-12 05:07:42 +01:00
|
|
|
libXdamage
|
2019-12-04 21:23:14 +00:00
|
|
|
pango
|
|
|
|
pipewire
|
2020-11-08 15:19:00 +00:00
|
|
|
sysprof
|
2019-12-04 21:23:14 +00:00
|
|
|
xkeyboard_config
|
|
|
|
xwayland
|
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-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
|
|
|
'';
|
|
|
|
|
2020-10-11 17:40:55 +01:00
|
|
|
# Install udev files into our own tree.
|
|
|
|
PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev";
|
|
|
|
|
2019-02-13 21:47:50 +00:00
|
|
|
passthru = {
|
2021-07-24 08:25:14 +01:00
|
|
|
libdir = "${self}/lib/mutter-8";
|
2020-07-10 18:42:13 +01:00
|
|
|
|
|
|
|
tests = {
|
|
|
|
libdirExists = runCommand "mutter-libdir-exists" {} ''
|
|
|
|
if [[ ! -d ${self.libdir} ]]; then
|
|
|
|
echo "passthru.libdir should contain a directory, “${self.libdir}” is not one."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
touch $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2021-05-07 22:18:14 +01:00
|
|
|
updateScript = gnome.updateScript {
|
2019-12-04 21:23:14 +00:00
|
|
|
packageName = pname;
|
2021-05-07 22:18:14 +01:00
|
|
|
attrPath = "gnome.${pname}";
|
2019-02-13 21:47:50 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-12-04 21:23:14 +00:00
|
|
|
description = "A window manager for GNOME";
|
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/mutter";
|
2021-03-21 07:30:11 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-01 13:40:51 +01:00
|
|
|
maintainers = teams.gnome.members;
|
2019-12-04 21:23:14 +00:00
|
|
|
platforms = platforms.linux;
|
2016-09-18 20:35:23 +01:00
|
|
|
};
|
2020-07-10 18:42:13 +01:00
|
|
|
};
|
|
|
|
in self
|