dde-gsettings-schemas: Bring closer to GNOME

Same with cb0c70b388
This commit is contained in:
rewine 2023-10-27 21:01:48 +08:00
parent 142e140601
commit 3a056b3ff9
No known key found for this signature in database
GPG Key ID: 2964FF5514455F51

View File

@ -33,17 +33,18 @@ in
with lib;
# TODO: Having https://github.com/NixOS/nixpkgs/issues/54150 would supersede this
runCommand "nixos-gsettings-desktop-schemas" { }
''
schema_dir=$out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
runCommand "nixos-gsettings-desktop-schemas" { preferLocalBuild = true; }
''
data_dir="$out/share/gsettings-schemas/nixos-gsettings-overrides"
schema_dir="$data_dir/glib-2.0/schemas"
mkdir -p $schema_dir
${concatMapStrings (pkg: "cp -rvf ${glib.getSchemaPath pkg}/* $schema_dir\n") gsettingsOverridePackages}
${concatMapStringsSep "\n" (pkg: "cp -rf \"${glib.getSchemaPath pkg}\"/*.xml \"$schema_dir\"") gsettingsOverridePackages}
chmod -R a+w $out/share/gsettings-schemas/nixos-gsettings-overrides
chmod -R a+w "$data_dir"
cat - > $schema_dir/nixos-defaults.gschema.override <<- EOF
cat - > "$schema_dir/nixos-defaults.gschema.override" <<- EOF
${extraGSettingsOverrides}
EOF