Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #268502 from alois31/polkit-rsync

polkit: remove build-dependency on rsync

authored by Jan Tojnar and committed by GitHub 9ae1093b 54da81fc

+8 -14
+8 -14
pkgs/development/libraries/polkit/default.nix
··· 9 9 , mesonEmulatorHook 10 10 , ninja 11 11 , perl 12 - , rsync 13 12 , python3 14 13 , fetchpatch 15 14 , gettext ··· 72 71 meson 73 72 ninja 74 73 perl 75 - rsync 76 74 77 75 # man pages 78 76 libxslt ··· 131 129 # at install time but Meson does not support this 132 130 # so we need to convince it to install all files to a temporary 133 131 # location using DESTDIR and then move it to proper one in postInstall. 134 - DESTDIR = "${placeholder "out"}/dest"; 132 + env.DESTDIR = "dest"; 135 133 136 134 inherit doCheck; 137 135 ··· 165 163 166 164 postInstall = '' 167 165 # Move stuff from DESTDIR to proper location. 168 - # We use rsync to merge the directories. 169 - rsync --archive "${DESTDIR}/etc" "$out" 170 - rm --recursive "${DESTDIR}/etc" 171 - rsync --archive "${DESTDIR}${system}"/* "$out" 172 - rm --recursive "${DESTDIR}${system}"/* 173 - rmdir --parents --ignore-fail-on-non-empty "${DESTDIR}${system}" 166 + # We need to be careful with the ordering to merge without conflicts. 174 167 for o in $(getAllOutputNames); do 175 - rsync --archive "${DESTDIR}/''${!o}" "$(dirname "''${!o}")" 176 - rm --recursive "${DESTDIR}/''${!o}" 168 + mv "$DESTDIR/''${!o}" "''${!o}" 177 169 done 178 - # Ensure the DESTDIR is removed. 179 - destdirContainer="$(dirname "${DESTDIR}")" 180 - pushd "$destdirContainer"; rmdir --parents "''${DESTDIR##$destdirContainer/}${builtins.storeDir}"; popd 170 + mv "$DESTDIR/etc" "$out" 171 + mv "$DESTDIR${system}/share"/* "$out/share" 172 + # Ensure we did not forget to install anything. 173 + rmdir --parents --ignore-fail-on-non-empty "$DESTDIR${builtins.storeDir}" "$DESTDIR${system}/share" 174 + ! test -e "$DESTDIR" 181 175 ''; 182 176 183 177 meta = with lib; {