summary refs log tree commit diff
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2017-05-09 13:58:17 +0100
committerLinus Heckemann <git@sphalerite.org>2017-05-09 13:58:17 +0100
commitadf76dbc54c12ceda32cd19ab3b408d59ad70902 (patch)
tree2a1f525d7a0717a2636a3fdbb2a862034b8ee19b
parent8584a169220a91791158c49e0021ca330092c712 (diff)
downloadnixpkgs-adf76dbc54c12ceda32cd19ab3b408d59ad70902.tar
nixpkgs-adf76dbc54c12ceda32cd19ab3b408d59ad70902.tar.gz
nixpkgs-adf76dbc54c12ceda32cd19ab3b408d59ad70902.tar.bz2
nixpkgs-adf76dbc54c12ceda32cd19ab3b408d59ad70902.tar.lz
nixpkgs-adf76dbc54c12ceda32cd19ab3b408d59ad70902.tar.xz
nixpkgs-adf76dbc54c12ceda32cd19ab3b408d59ad70902.tar.zst
nixpkgs-adf76dbc54c12ceda32cd19ab3b408d59ad70902.zip
syncthing: correct path for systemd units
The systemd files included with syncthing are "library" and not
"configuration" units, so they should be placed in lib/systemd
rather than etc/systemd, so that they can be customised by creating
unit files in etc/. This also corresponds to how syncthing's own
build script installs them.
-rw-r--r--pkgs/applications/networking/syncthing/default.nix8
-rw-r--r--pkgs/applications/networking/syncthing/inotify.nix6
2 files changed, 7 insertions, 7 deletions
diff --git a/pkgs/applications/networking/syncthing/default.nix b/pkgs/applications/networking/syncthing/default.nix
index f90e30c61bb..5462c8bacdd 100644
--- a/pkgs/applications/networking/syncthing/default.nix
+++ b/pkgs/applications/networking/syncthing/default.nix
@@ -25,20 +25,20 @@ stdenv.mkDerivation rec {
   '';
 
   installPhase = ''
-    mkdir -p $out/bin $out/etc/systemd/{system,user}
+    mkdir -p $out/bin $out/lib/systemd/{system,user}
 
     cp bin/* $out/bin
   '' + lib.optionalString (stdenv.isLinux) ''
     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
 
     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
 
     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
   '';
 
diff --git a/pkgs/applications/networking/syncthing/inotify.nix b/pkgs/applications/networking/syncthing/inotify.nix
index db99a1aa109..6e9c1ba1028 100644
--- a/pkgs/applications/networking/syncthing/inotify.nix
+++ b/pkgs/applications/networking/syncthing/inotify.nix
@@ -16,14 +16,14 @@ buildGoPackage rec {
   goDeps = ./inotify-deps.nix;
 
   postInstall = ''
-    mkdir -p $bin/etc/systemd/{system,user}
+    mkdir -p $bin/lib/systemd/{system,user}
 
     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
 
     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
   '' + stdenv.lib.optionalString stdenv.isDarwin ''
     install_name_tool -delete_rpath $out/lib -add_rpath $bin $bin/bin/syncthing-inotify