depot/third_party/nixpkgs/pkgs/desktops/cinnamon/cinnamon-gsettings-overrides/default.nix
Default email 841d9c7fc1 Project import generated by Copybara.
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
2021-06-29 00:13:55 +01:00

59 lines
1.2 KiB
Nix

{ lib
, runCommand
, nixos-artwork
, glib
, gtk3
, gsettings-desktop-schemas
, extraGSettingsOverrides ? ""
, 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
with lib;
# TODO: Having https://github.com/NixOS/nixpkgs/issues/54150 would supersede this
runCommand "cinnamon-gsettings-overrides" {}
''
schema_dir=$out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
mkdir -p $schema_dir
${concatMapStrings (pkg: "cp -rf ${glib.getSchemaPath pkg}/*.xml ${glib.getSchemaPath pkg}/*.gschema.override $schema_dir\n") gsettingsOverridePackages}
chmod -R a+w $out/share/gsettings-schemas/nixos-gsettings-overrides
cat - > $schema_dir/nixos-defaults.gschema.override <<- EOF
${extraGSettingsOverrides}
EOF
${glib.dev}/bin/glib-compile-schemas $schema_dir
''