nixpkgs/pkgs/desktops/pantheon/desktop/elementary-default-settings/default.nix
Bobby Rong 9a9e44ca04
pantheon.elementary-default-settings: Backport pantheon-portals.conf support
See the changes in x-d-p 1.17 for details. Pantheon's config is quite complex
compared to other DEs >_<  gnome-keyring is already added to xdg.portal.extraPortals
in its separate modules.
2023-10-06 23:24:26 +08:00

79 lines
1.9 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, nix-update-script
, meson
, ninja
, nixos-artwork
, glib
, pkg-config
, dbus
, polkit
, accountsservice
}:
stdenv.mkDerivation rec {
pname = "elementary-default-settings";
version = "7.1.0";
src = fetchFromGitHub {
owner = "elementary";
repo = "default-settings";
rev = version;
sha256 = "sha256-j4K8qYwfu6/s4qnTSzwv6KRsk9f+Qr/l1bhLywKMHMU=";
};
patches = [
# Add pantheon-portals.conf
# https://github.com/elementary/default-settings/pull/293
(fetchpatch {
url = "https://github.com/elementary/default-settings/commit/8201eeb6a356e6059b505756ef7a556a6848ad3b.patch";
sha256 = "sha256-qhGj7WQTAWJTC1kouUZhBWKqyO4hQWJghEhLVl8QVUM=";
})
];
nativeBuildInputs = [
accountsservice
dbus
glib # polkit requires
meson
ninja
pkg-config
polkit
];
mesonFlags = [
"--sysconfdir=${placeholder "out"}/etc"
"-Ddefault-wallpaper=${nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}"
"-Dplank-dockitems=false"
];
preInstall = ''
# Install our override for plank dockitems as the desktop file path is different.
schema_dir=$out/share/glib-2.0/schemas
install -D ${./overrides/plank-dockitems.gschema.override} $schema_dir/plank-dockitems.gschema.override
# Our launchers that use paths at /run/current-system/sw/bin
mkdir -p $out/etc/skel/.config/plank/dock1
cp -avr ${./launchers} $out/etc/skel/.config/plank/dock1/launchers
'';
postFixup = ''
# https://github.com/elementary/default-settings/issues/55
rm -r $out/share/cups
rm -r $out/share/applications
'';
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Default settings and configuration files for elementary";
homepage = "https://github.com/elementary/default-settings";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = teams.pantheon.members;
};
}