From 90931eaa398c0a78c612749ee975dc283dd60760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Fri, 24 Jan 2020 23:04:47 +0100 Subject: [PATCH] cinnamon.cinnamon-session: init at 4.4.0 --- .../0001-Add-dbus_glib-dependency.patch | 38 +++++++ .../cinnamon/cinnamon-session/default.nix | 105 ++++++++++++++++++ pkgs/desktops/cinnamon/default.nix | 1 + 3 files changed, 144 insertions(+) create mode 100644 pkgs/desktops/cinnamon/cinnamon-session/0001-Add-dbus_glib-dependency.patch create mode 100644 pkgs/desktops/cinnamon/cinnamon-session/default.nix diff --git a/pkgs/desktops/cinnamon/cinnamon-session/0001-Add-dbus_glib-dependency.patch b/pkgs/desktops/cinnamon/cinnamon-session/0001-Add-dbus_glib-dependency.patch new file mode 100644 index 000000000000..156573c30e9a --- /dev/null +++ b/pkgs/desktops/cinnamon/cinnamon-session/0001-Add-dbus_glib-dependency.patch @@ -0,0 +1,38 @@ +From ddc2c4faeec36675654a2f8f04c3011b807fdf79 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= +Date: Sun, 22 Mar 2020 07:36:25 +0100 +Subject: [PATCH] Add dbus_glib dependency + +--- + cinnamon-session/meson.build | 2 +- + meson.build | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/cinnamon-session/meson.build b/cinnamon-session/meson.build +index ee8916f..9dd9283 100644 +--- a/cinnamon-session/meson.build ++++ b/cinnamon-session/meson.build +@@ -74,7 +74,7 @@ executable('cinnamon-session', + xext, + xrender, + xtest, +- # elogind, ++ dbus_glib, + ], + link_with: [ + libegg, +diff --git a/meson.build b/meson.build +index 231a448..db306dc 100644 +--- a/meson.build ++++ b/meson.build +@@ -48,6 +48,7 @@ else + gconf = dependency('', required: false) + endif + conf.set('HAVE_GCONF', gconf.found()) ++dbus_glib = dependency('dbus-glib-1') + + + gio_unix = dependency('gio-unix-2.0', required: false) +-- +2.25.1 + diff --git a/pkgs/desktops/cinnamon/cinnamon-session/default.nix b/pkgs/desktops/cinnamon/cinnamon-session/default.nix new file mode 100644 index 000000000000..56ff4b106e33 --- /dev/null +++ b/pkgs/desktops/cinnamon/cinnamon-session/default.nix @@ -0,0 +1,105 @@ +{ fetchFromGitHub +, cinnamon-desktop +, cinnamon-settings-daemon +, dbus-glib +, docbook_xsl +, docbook_xml_dtd_412 +, glib +, gsettings-desktop-schemas +, gtk3 +, libcanberra +, libxslt +, makeWrapper +, meson +, ninja +, pkgconfig +, python3 +, stdenv +, systemd +, wrapGAppsHook +, xapps +, xmlto +, xorg +, cmake +, libexecinfo +, pango +}: + +stdenv.mkDerivation rec { + pname = "cinnamon-session"; + version = "4.4.0"; + + src = fetchFromGitHub { + owner = "linuxmint"; + repo = pname; + rev = version; + sha256 = "0hplck17rksfgqm2z58ajvz4p2m4zg6ksdpbc27ki20iv4fv620s"; + }; + + patches = [ + ./0001-Add-dbus_glib-dependency.patch + ]; + + buildInputs = [ + # meson.build + gtk3 + glib + libcanberra + pango + xorg.libX11 + xorg.libXext + xapps + xorg.libXau + xorg.libXcomposite + + systemd + + xorg.libXtst + xorg.libXrender + xorg.xtrans + + # other (not meson.build) + + cinnamon-desktop + cinnamon-settings-daemon + dbus-glib + glib + gsettings-desktop-schemas + ]; + + nativeBuildInputs = [ + meson + ninja + wrapGAppsHook + libexecinfo + docbook_xsl + docbook_xml_dtd_412 + python3 + pkgconfig + libxslt + xmlto + ]; + + # TODO: https://github.com/NixOS/nixpkgs/issues/36468 + mesonFlags = [ "-Dc_args=-I${glib.dev}/include/gio-unix-2.0" "-Dgconf=false" "-DENABLE_IPV6=true" ]; + + postPatch = '' + chmod +x data/meson_install_schemas.py # patchShebangs requires executable file + patchShebangs data/meson_install_schemas.py + ''; + + preFixup = '' + gappsWrapperArgs+=( + --prefix XDG_DATA_DIRS : "${cinnamon-desktop}/share" + --prefix XDG_CONFIG_DIRS : "${cinnamon-settings-daemon}/etc/xdg" + ) + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/linuxmint/cinnamon-session"; + description = "The Cinnamon session manager"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ maintainers.mkg20001 ]; + }; +} diff --git a/pkgs/desktops/cinnamon/default.nix b/pkgs/desktops/cinnamon/default.nix index b077ad184769..ba99d2d36b58 100644 --- a/pkgs/desktops/cinnamon/default.nix +++ b/pkgs/desktops/cinnamon/default.nix @@ -4,6 +4,7 @@ lib.makeScope pkgs.newScope (self: with self; { cinnamon-desktop = callPackage ./cinnamon-desktop { }; cinnamon-menus = callPackage ./cinnamon-menus { }; cinnamon-translations = callPackage ./cinnamon-translations { }; + cinnamon-session = callPackage ./cinnamon-session { }; cinnamon-settings-daemon = callPackage ./cinnamon-settings-daemon { }; cjs = callPackage ./cjs { }; nemo = callPackage ./nemo { };