Files
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

92 lines
2.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
desktop-file-utils,
gettext,
pkg-config,
gnome-keyring,
gnome-session,
wingpanel,
orca,
onboard,
elementary-default-settings,
gnome-settings-daemon,
runtimeShell,
systemd,
writeText,
meson,
ninja,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "elementary-session-settings";
version = "8.1.0";
src = fetchFromGitHub {
owner = "elementary";
repo = "session-settings";
tag = finalAttrs.version;
hash = "sha256-mdfmCzR9ikXDlDc7FeOITsdbPbz+G66jUrl1BobY+g8=";
};
patches = [
# See https://github.com/elementary/session-settings/issues/88 for gnome-keyring.
# See https://github.com/elementary/session-settings/issues/82 for onboard.
./no-autostart.patch
];
nativeBuildInputs = [
desktop-file-utils
gettext
meson
ninja
pkg-config
];
buildInputs = [
gnome-keyring
gnome-settings-daemon
onboard
orca
systemd
];
mesonFlags = [
"-Dmimeapps-list=false"
"-Ddetect-program-prefixes=true"
# https://github.com/elementary/session-settings/issues/91
"-Dx11=false"
"--sysconfdir=${placeholder "out"}/etc"
];
postInstall = ''
# our mimeapps patched from upstream to exclude:
# * evince.desktop -> org.gnome.Evince.desktop
mkdir -p $out/share/applications
cp -av ${./pantheon-mimeapps.list} $out/share/applications/pantheon-mimeapps.list
# absolute path patched sessions
substituteInPlace $out/share/wayland-sessions/pantheon-wayland.desktop \
--replace-fail "Exec=gnome-session" "Exec=${gnome-session}/bin/gnome-session" \
--replace-fail "TryExec=io.elementary.wingpanel" "TryExec=${wingpanel}/bin/io.elementary.wingpanel"
'';
passthru = {
updateScript = nix-update-script { };
providedSessions = [
"pantheon-wayland"
];
};
meta = {
description = "Session settings for elementary";
homepage = "https://github.com/elementary/session-settings";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
teams = [ lib.teams.pantheon ];
};
})