mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Fix broken upstream user unit symlinks
This commit is contained in:
parent
85fdaed9de
commit
1e540af43b
1 changed files with 6 additions and 1 deletions
|
@ -379,7 +379,12 @@ let
|
|||
fn=${systemd}/example/systemd/${type}/$i
|
||||
if ! [ -e $fn ]; then echo "missing $fn"; false; fi
|
||||
if [ -L $fn ]; then
|
||||
cp -pd $fn $out/
|
||||
target="$(readlink "$fn")"
|
||||
if [ ''${target:0:3} = ../ ]; then
|
||||
ln -s "$(readlink -f "$fn")" $out/
|
||||
else
|
||||
cp -pd $fn $out/
|
||||
fi
|
||||
else
|
||||
ln -s $fn $out/
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue