Merge pull request #25643 from lheckemann/syncthing-systemd-path
syncthing: correct path for systemd units
This commit is contained in:
commit
50711091f8
@ -25,20 +25,20 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/etc/systemd/{system,user}
|
mkdir -p $out/bin $out/lib/systemd/{system,user}
|
||||||
|
|
||||||
cp bin/* $out/bin
|
cp bin/* $out/bin
|
||||||
'' + lib.optionalString (stdenv.isLinux) ''
|
'' + lib.optionalString (stdenv.isLinux) ''
|
||||||
substitute etc/linux-systemd/system/syncthing-resume.service \
|
substitute etc/linux-systemd/system/syncthing-resume.service \
|
||||||
$out/etc/systemd/system/syncthing-resume.service \
|
$out/lib/systemd/system/syncthing-resume.service \
|
||||||
--replace /usr/bin/pkill ${pkgs.procps}/bin/pkill
|
--replace /usr/bin/pkill ${pkgs.procps}/bin/pkill
|
||||||
|
|
||||||
substitute etc/linux-systemd/system/syncthing@.service \
|
substitute etc/linux-systemd/system/syncthing@.service \
|
||||||
$out/etc/systemd/system/syncthing@.service \
|
$out/lib/systemd/system/syncthing@.service \
|
||||||
--replace /usr/bin/syncthing $out/bin/syncthing
|
--replace /usr/bin/syncthing $out/bin/syncthing
|
||||||
|
|
||||||
substitute etc/linux-systemd/user/syncthing.service \
|
substitute etc/linux-systemd/user/syncthing.service \
|
||||||
$out/etc/systemd/user/syncthing.service \
|
$out/lib/systemd/user/syncthing.service \
|
||||||
--replace /usr/bin/syncthing $out/bin/syncthing
|
--replace /usr/bin/syncthing $out/bin/syncthing
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -16,14 +16,14 @@ buildGoPackage rec {
|
|||||||
goDeps = ./inotify-deps.nix;
|
goDeps = ./inotify-deps.nix;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $bin/etc/systemd/{system,user}
|
mkdir -p $bin/lib/systemd/{system,user}
|
||||||
|
|
||||||
substitute $src/etc/linux-systemd/system/syncthing-inotify@.service \
|
substitute $src/etc/linux-systemd/system/syncthing-inotify@.service \
|
||||||
$bin/etc/systemd/system/syncthing-inotify@.service \
|
$bin/lib/systemd/system/syncthing-inotify@.service \
|
||||||
--replace /usr/bin/syncthing-inotify $bin/bin/syncthing-inotify
|
--replace /usr/bin/syncthing-inotify $bin/bin/syncthing-inotify
|
||||||
|
|
||||||
substitute $src/etc/linux-systemd/user/syncthing-inotify.service \
|
substitute $src/etc/linux-systemd/user/syncthing-inotify.service \
|
||||||
$bin/etc/systemd/user/syncthing-inotify.service \
|
$bin/lib/systemd/user/syncthing-inotify.service \
|
||||||
--replace /usr/bin/syncthing-inotify $bin/bin/syncthing-inotify
|
--replace /usr/bin/syncthing-inotify $bin/bin/syncthing-inotify
|
||||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
install_name_tool -delete_rpath $out/lib -add_rpath $bin $bin/bin/syncthing-inotify
|
install_name_tool -delete_rpath $out/lib -add_rpath $bin $bin/bin/syncthing-inotify
|
||||||
|
Loading…
Reference in New Issue
Block a user