diff options
author | Artturi <Artturin@artturin.com> | 2022-03-22 19:57:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-22 19:57:02 +0200 |
commit | 6396adbdfa8cef5d59025d855e5872facd2c6ea8 (patch) | |
tree | c4afa6286597a0e87f5a9bf6b7b611ea8b2f7bf2 /pkgs | |
parent | 0ce256984a5ccb800e1cb2c841fa25eb28f89292 (diff) | |
parent | d5bf6bac5c0e51624eb26d38621718759df32eac (diff) |
Merge pull request #164420 from corngood/build-fhs-fix
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/build-support/build-fhs-userenv-bubblewrap/env.nix | 19 | ||||
-rw-r--r-- | pkgs/build-support/build-fhs-userenv/env.nix | 19 |
2 files changed, 22 insertions, 16 deletions
diff --git a/pkgs/build-support/build-fhs-userenv-bubblewrap/env.nix b/pkgs/build-support/build-fhs-userenv-bubblewrap/env.nix index d0f88df445374..93292122b739c 100644 --- a/pkgs/build-support/build-fhs-userenv-bubblewrap/env.nix +++ b/pkgs/build-support/build-fhs-userenv-bubblewrap/env.nix @@ -97,18 +97,21 @@ let if [[ -d $out/share/gsettings-schemas/ ]]; then # Recreate the standard schemas directory if its a symlink to make it writable if [[ -L $out/share/glib-2.0 ]]; then - ln -s $(readlink $out/share/glib-2.0) $out/share/glib-2.0.old - rm -rf $out/share/glib-2.0 + target=$(readlink $out/share/glib-2.0) + rm $out/share/glib-2.0 + mkdir $out/share/glib-2.0 + ln -fs $target/* $out/share/glib-2.0 fi - mkdir -p $out/share/glib-2.0/schemas - - # symlink any schema files or overrides to the standard schema directory - if [[ -e $out/share/glib-2.0.old/schemas ]]; then - ln -fs $out/share/glib-2.0.old/schemas/*.xml $out/share/glib-2.0/schemas - ln -fs $out/share/glib-2.0.old/schemas/*.gsettings-schemas.override $out/share/glib-2.0/schemas + if [[ -L $out/share/glib-2.0/schemas ]]; then + target=$(readlink $out/share/glib-2.0/schemas) + rm $out/share/glib-2.0/schemas + mkdir $out/share/glib-2.0/schemas + ln -fs $target/* $out/share/glib-2.0/schemas fi + mkdir -p $out/share/glib-2.0/schemas + for d in $out/share/gsettings-schemas/*; do # Force symlink, in case there are duplicates ln -fs $d/glib-2.0/schemas/*.xml $out/share/glib-2.0/schemas diff --git a/pkgs/build-support/build-fhs-userenv/env.nix b/pkgs/build-support/build-fhs-userenv/env.nix index 7251500f76c5a..cdc3096fcbfd5 100644 --- a/pkgs/build-support/build-fhs-userenv/env.nix +++ b/pkgs/build-support/build-fhs-userenv/env.nix @@ -138,18 +138,21 @@ let if [[ -d $out/share/gsettings-schemas/ ]]; then # Recreate the standard schemas directory if its a symlink to make it writable if [[ -L $out/share/glib-2.0 ]]; then - ln -s $(readlink $out/share/glib-2.0) $out/share/glib-2.0.old - rm -rf $out/share/glib-2.0 + target=$(readlink $out/share/glib-2.0) + rm $out/share/glib-2.0 + mkdir $out/share/glib-2.0 + ln -fs $target/* $out/share/glib-2.0 fi - mkdir -p $out/share/glib-2.0/schemas - - # symlink any schema files or overrides to the standard schema directory - if [[ -e $out/share/glib-2.0.old/schemas ]]; then - ln -fs $out/share/glib-2.0.old/schemas/*.xml $out/share/glib-2.0/schemas - ln -fs $out/share/glib-2.0.old/schemas/*.gsettings-schemas.override $out/share/glib-2.0/schemas + if [[ -L $out/share/glib-2.0/schemas ]]; then + target=$(readlink $out/share/glib-2.0/schemas) + rm $out/share/glib-2.0/schemas + mkdir $out/share/glib-2.0/schemas + ln -fs $target/* $out/share/glib-2.0/schemas fi + mkdir -p $out/share/glib-2.0/schemas + for d in $out/share/gsettings-schemas/*; do # Force symlink, in case there are duplicates ln -fs $d/glib-2.0/schemas/*.xml $out/share/glib-2.0/schemas |