2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2019-08-05 20:02:06 +02:00
|
|
|
, fetchFromGitHub
|
2020-07-29 18:33:39 +02:00
|
|
|
, nix-update-script
|
2019-08-05 20:02:06 +02:00
|
|
|
, pantheon
|
2019-10-05 07:16:12 +02:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, nixos-artwork
|
|
|
|
, glib
|
2021-01-17 03:21:50 +01:00
|
|
|
, pkg-config
|
2019-10-05 07:16:12 +02:00
|
|
|
, dbus
|
|
|
|
, polkit
|
|
|
|
, accountsservice
|
|
|
|
, python3
|
2020-04-01 04:19:56 +02:00
|
|
|
, fetchpatch
|
2019-08-05 20:02:06 +02:00
|
|
|
}:
|
2018-08-20 22:31:18 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-06 00:41:32 +02:00
|
|
|
pname = "elementary-default-settings";
|
2020-01-19 03:23:11 +01:00
|
|
|
version = "5.1.2";
|
2018-08-20 22:31:18 +02:00
|
|
|
|
2019-08-06 00:41:32 +02:00
|
|
|
repoName = "default-settings";
|
2018-08-20 22:31:18 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elementary";
|
2019-08-06 00:41:32 +02:00
|
|
|
repo = repoName;
|
2018-08-20 22:31:18 +02:00
|
|
|
rev = version;
|
2020-09-04 01:43:09 +02:00
|
|
|
sha256 = "sha256-HKrDs2frEWVPpwyGNP+NikrjyplSXJj1hFMLy6kK4wM=";
|
2018-08-20 22:31:18 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {
|
2020-07-29 18:33:39 +02:00
|
|
|
updateScript = nix-update-script {
|
2019-12-22 07:44:42 +01:00
|
|
|
attrPath = "pantheon.${pname}";
|
2018-08-20 22:31:18 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2020-04-01 04:19:56 +02:00
|
|
|
# Use new notifications
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/elementary/default-settings/commit/0658bb75b9f49f58b35746d05fb6c4b811f125e9.patch";
|
|
|
|
sha256 = "0wa7iq0vfp2av5v23w94a5844ddj4g48d4wk3yrp745dyrimg739";
|
|
|
|
})
|
|
|
|
|
2020-04-01 04:55:13 +02:00
|
|
|
# Fix media key syntax
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/elementary/default-settings/commit/332aefe1883be5dfe90920e165c39e331a53b2ea.patch";
|
|
|
|
sha256 = "0ypcaga55pw58l30srq3ga1mhz2w6hkwanv41jjr6g3ia9jvq69n";
|
|
|
|
})
|
|
|
|
|
2019-10-05 07:16:12 +02:00
|
|
|
# https://github.com/elementary/default-settings/pull/119
|
|
|
|
./0001-Build-with-Meson.patch
|
2018-08-20 22:31:18 +02:00
|
|
|
];
|
|
|
|
|
2019-10-05 07:16:12 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
accountsservice
|
|
|
|
dbus
|
|
|
|
glib # polkit requires
|
|
|
|
meson
|
|
|
|
ninja
|
2021-01-17 03:21:50 +01:00
|
|
|
pkg-config
|
2019-10-05 07:16:12 +02:00
|
|
|
polkit
|
|
|
|
python3
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"--sysconfdir=${placeholder "out"}/etc"
|
2020-04-28 04:35:31 +02:00
|
|
|
"-Ddefault-wallpaper=${nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}"
|
2019-10-05 07:16:12 +02:00
|
|
|
"-Dplank-dockitems=false"
|
|
|
|
];
|
2018-08-20 22:31:18 +02:00
|
|
|
|
2019-10-05 07:16:12 +02:00
|
|
|
postPatch = ''
|
|
|
|
chmod +x meson/post_install.py
|
|
|
|
patchShebangs meson/post_install.py
|
|
|
|
'';
|
2018-08-20 22:31:18 +02:00
|
|
|
|
2019-10-05 07:16:12 +02:00
|
|
|
preInstall = ''
|
|
|
|
# Install our override for plank dockitems.
|
|
|
|
# This is because we don't have Pantheon's mail or Appcenter.
|
|
|
|
# See: https://github.com/NixOS/nixpkgs/issues/58161
|
|
|
|
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
|
|
|
|
|
|
|
|
# Whitelist wingpanel indicators to be used in the greeter
|
2020-07-07 16:52:14 +02:00
|
|
|
# hhttps://github.com/elementary/greeter/blob/fc19752f147c62767cd2097c0c0c0fcce41e5873/debian/io.elementary.greeter.whitelist
|
|
|
|
# wingpanel 2.3.2 renamed this to .allowed to .forbidden
|
|
|
|
# https://github.com/elementary/wingpanel/pull/326
|
|
|
|
install -D ${./io.elementary.greeter.allowed} $out/etc/wingpanel.d/io.elementary.greeter.allowed
|
2019-10-05 07:16:12 +02:00
|
|
|
'';
|
2018-08-20 22:31:18 +02:00
|
|
|
|
2019-10-05 07:16:12 +02:00
|
|
|
postFixup = ''
|
|
|
|
# https://github.com/elementary/default-settings/issues/55
|
|
|
|
rm -rf $out/share/plymouth
|
|
|
|
rm -rf $out/share/cups
|
2018-08-20 22:31:18 +02:00
|
|
|
|
2019-10-05 07:16:12 +02:00
|
|
|
rm -rf $out/share/applications
|
2018-08-20 22:31:18 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-08-20 22:31:18 +02:00
|
|
|
description = "Default settings and configuration files for elementary";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/elementary/default-settings";
|
2018-08-20 22:31:18 +02:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = pantheon.maintainers;
|
|
|
|
};
|
|
|
|
}
|