cinnamon.cinnamon-gsettings-overrides: Bring closer to GNOME
- Prefer local builds to avoid costly copying. - Quote arguments. - Avoid `with` statements. - Use `concatMapStringsSep`.
This commit is contained in:
parent
35e033d416
commit
dff1ed8690
1 changed files with 10 additions and 9 deletions
|
@ -20,6 +20,8 @@
|
|||
|
||||
let
|
||||
|
||||
inherit (lib) concatMapStringsSep;
|
||||
|
||||
gsettingsOverridePackages = [
|
||||
# from
|
||||
mint-artwork
|
||||
|
@ -38,22 +40,21 @@ let
|
|||
|
||||
in
|
||||
|
||||
with lib;
|
||||
|
||||
# TODO: Having https://github.com/NixOS/nixpkgs/issues/54150 would supersede this
|
||||
runCommand "cinnamon-gsettings-overrides" { }
|
||||
runCommand "cinnamon-gsettings-overrides" { preferLocalBuild = true; }
|
||||
''
|
||||
schema_dir=$out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
|
||||
data_dir="$out/share/gsettings-schemas/nixos-gsettings-overrides"
|
||||
schema_dir="$data_dir/glib-2.0/schemas"
|
||||
|
||||
mkdir -p $schema_dir
|
||||
mkdir -p "$schema_dir"
|
||||
|
||||
${concatMapStrings (pkg: "cp -rf ${glib.getSchemaPath pkg}/*.xml ${glib.getSchemaPath pkg}/*.gschema.override $schema_dir\n") gsettingsOverridePackages}
|
||||
${concatMapStringsSep "\n" (pkg: "cp -rf \"${glib.getSchemaPath pkg}\"/*.xml \"${glib.getSchemaPath pkg}\"/*.gschema.override \"$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
|
||||
|
||||
${glib.dev}/bin/glib-compile-schemas $schema_dir
|
||||
${glib.dev}/bin/glib-compile-schemas "$schema_dir"
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue