diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/polkit/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/polkit/default.nix | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/development/libraries/polkit/default.nix b/nixpkgs/pkgs/development/libraries/polkit/default.nix index 80badcdd4dbd..dabba056b487 100644 --- a/nixpkgs/pkgs/development/libraries/polkit/default.nix +++ b/nixpkgs/pkgs/development/libraries/polkit/default.nix @@ -9,7 +9,6 @@ , mesonEmulatorHook , ninja , perl -, rsync , python3 , fetchpatch , gettext @@ -72,7 +71,6 @@ stdenv.mkDerivation rec { meson ninja perl - rsync # man pages libxslt @@ -131,7 +129,7 @@ stdenv.mkDerivation rec { # at install time but Meson does not support this # so we need to convince it to install all files to a temporary # location using DESTDIR and then move it to proper one in postInstall. - DESTDIR = "${placeholder "out"}/dest"; + env.DESTDIR = "dest"; inherit doCheck; @@ -165,19 +163,15 @@ stdenv.mkDerivation rec { postInstall = '' # Move stuff from DESTDIR to proper location. - # We use rsync to merge the directories. - rsync --archive "${DESTDIR}/etc" "$out" - rm --recursive "${DESTDIR}/etc" - rsync --archive "${DESTDIR}${system}"/* "$out" - rm --recursive "${DESTDIR}${system}"/* - rmdir --parents --ignore-fail-on-non-empty "${DESTDIR}${system}" + # We need to be careful with the ordering to merge without conflicts. for o in $(getAllOutputNames); do - rsync --archive "${DESTDIR}/''${!o}" "$(dirname "''${!o}")" - rm --recursive "${DESTDIR}/''${!o}" + mv "$DESTDIR/''${!o}" "''${!o}" done - # Ensure the DESTDIR is removed. - destdirContainer="$(dirname "${DESTDIR}")" - pushd "$destdirContainer"; rmdir --parents "''${DESTDIR##$destdirContainer/}${builtins.storeDir}"; popd + mv "$DESTDIR/etc" "$out" + mv "$DESTDIR${system}/share"/* "$out/share" + # Ensure we did not forget to install anything. + rmdir --parents --ignore-fail-on-non-empty "$DESTDIR${builtins.storeDir}" "$DESTDIR${system}/share" + ! test -e "$DESTDIR" ''; meta = with lib; { |