3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/desktops/cinnamon/cinnamon-gsettings-overrides/default.nix

60 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, runCommand
, nixos-artwork
, glib
, gtk3
, gsettings-desktop-schemas
, extraGSettingsOverrides ? ""
2021-11-29 16:34:50 +00:00
, extraGSettingsOverridePackages ? [ ]
, mint-artwork
, muffin
, nemo
, xapps
, cinnamon-desktop
, cinnamon-session
, cinnamon-settings-daemon
, cinnamon-common
, bulky
}:
let
gsettingsOverridePackages = [
# from
mint-artwork
# on
bulky
muffin
nemo
xapps
cinnamon-desktop
cinnamon-session
cinnamon-settings-daemon
cinnamon-common
gtk3
] ++ extraGSettingsOverridePackages;
in
2021-01-15 13:21:58 +00:00
with lib;
# TODO: Having https://github.com/NixOS/nixpkgs/issues/54150 would supersede this
2021-11-29 16:34:50 +00:00
runCommand "cinnamon-gsettings-overrides" { }
''
2021-11-29 16:34:50 +00:00
schema_dir=$out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
2021-11-29 16:34:50 +00:00
mkdir -p $schema_dir
2021-11-29 16:34:50 +00:00
${concatMapStrings (pkg: "cp -rf ${glib.getSchemaPath pkg}/*.xml ${glib.getSchemaPath pkg}/*.gschema.override $schema_dir\n") gsettingsOverridePackages}
2021-11-29 16:34:50 +00:00
chmod -R a+w $out/share/gsettings-schemas/nixos-gsettings-overrides
2021-11-29 16:34:50 +00:00
cat - > $schema_dir/nixos-defaults.gschema.override <<- EOF
${extraGSettingsOverrides}
EOF
2021-11-29 16:34:50 +00:00
${glib.dev}/bin/glib-compile-schemas $schema_dir
''