diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:31:50 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:32:25 +0100 |
commit | b7baf40e099b4215181fe7b0c63083b12ef2c7fb (patch) | |
tree | a6efabd31d05b6d0a36624729e80377bbbfb0149 /nixpkgs/pkgs/development/libraries/polkit | |
parent | 710028664e26e85cb831a869b3da9f6993902255 (diff) | |
parent | 0799f514b1cd74878174939df79ac60ca5036673 (diff) | |
download | nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.gz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.bz2 nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.lz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.xz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.zst nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/polkit')
-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; { |