1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 18:42:15 +00:00
nixpkgs/pkgs/desktops/pantheon/desktop/elementary-gsettings-schemas/default.nix
worldofpeace 1f4b22cb37 pantheon.elementary-gsettings-schemas: drop wallpaper setting
We have this built-in with meson from elementary-default-settings.
2019-10-05 06:00:49 -04:00

52 lines
1.2 KiB
Nix

{ stdenv
, runCommand
, mutter
, elementary-default-settings
, nixos-artwork
, glib
, gala
, epiphany
, elementary-settings-daemon
, gtk3
, plank
, gsettings-desktop-schemas
, extraGSettingsOverrides ? ""
, extraGSettingsOverridePackages ? []
}:
let
gsettingsOverridePackages = [
elementary-settings-daemon
epiphany
gala
mutter
gsettings-desktop-schemas
gtk3
plank
] ++ extraGSettingsOverridePackages;
in
with stdenv.lib;
# TODO: Having https://github.com/NixOS/nixpkgs/issues/54150 would supersede this
runCommand "elementary-gsettings-desktop-schemas" {}
''
schema_dir=$out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
mkdir -p $schema_dir
cp -rf ${glib.getSchemaPath gsettings-desktop-schemas}/*.xml $schema_dir
${concatMapStrings (pkg: "cp -rf ${glib.getSchemaPath pkg}/*.xml $schema_dir\n") gsettingsOverridePackages}
chmod -R a+w $out/share/gsettings-schemas/nixos-gsettings-overrides
cp ${glib.getSchemaPath elementary-default-settings}/* $schema_dir
cat - > $schema_dir/nixos-defaults.gschema.override <<- EOF
${extraGSettingsOverrides}
EOF
${glib.dev}/bin/glib-compile-schemas $schema_dir
''