summary refs log tree commit diff
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2018-02-23 19:59:06 +0100
committerTimo Kaufmann <timokau@zoho.com>2018-02-24 01:08:44 +0100
commit5643128ff2ad22e5011747b63ba1f70e034c80d6 (patch)
treecfaec3ed9fe8f7fa9af40d39a3f8a7d4c7138808
parent7d37688d66bf830767ae39724406abd78347fcfb (diff)
downloadnixpkgs-5643128ff2ad22e5011747b63ba1f70e034c80d6.tar
nixpkgs-5643128ff2ad22e5011747b63ba1f70e034c80d6.tar.gz
nixpkgs-5643128ff2ad22e5011747b63ba1f70e034c80d6.tar.bz2
nixpkgs-5643128ff2ad22e5011747b63ba1f70e034c80d6.tar.lz
nixpkgs-5643128ff2ad22e5011747b63ba1f70e034c80d6.tar.xz
nixpkgs-5643128ff2ad22e5011747b63ba1f70e034c80d6.tar.zst
nixpkgs-5643128ff2ad22e5011747b63ba1f70e034c80d6.zip
syncthing,qsyncthingtray: remove syncthing-inotify
syncthing-inotify is replaced by the new syncthing "fswatcher" feature.
-rw-r--r--nixos/modules/services/networking/syncthing.nix30
-rw-r--r--pkgs/applications/misc/qsyncthingtray/default.nix3
-rw-r--r--pkgs/applications/networking/syncthing/inotify-deps.nix21
-rw-r--r--pkgs/applications/networking/syncthing/inotify.nix37
-rw-r--r--pkgs/top-level/all-packages.nix2
5 files changed, 8 insertions, 85 deletions
diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix
index dcdc203bdc6..e485c073cbd 100644
--- a/nixos/modules/services/networking/syncthing.nix
+++ b/nixos/modules/services/networking/syncthing.nix
@@ -16,12 +16,6 @@ in {
         available on http://127.0.0.1:8384/.
       '';
 
-      useInotify = mkOption {
-        type = types.bool;
-        default = false;
-        description = "Provide syncthing-inotify as a service.";
-      };
-
       systemService = mkOption {
         type = types.bool;
         default = true;
@@ -90,6 +84,12 @@ in {
     };
   };
 
+  imports = [
+    (mkRemovedOptionModule ["services" "syncthing" "useInotify"] ''
+      This option was removed because syncthing now has the inotify functionality included under the name "fswatcher".
+      It can be enabled on a per-folder basis through the webinterface.
+    '')
+  ];
 
   ###### implementation
 
@@ -100,8 +100,7 @@ in {
       allowedUDPPorts = [ 21027 ];
     };
 
-    systemd.packages = [ pkgs.syncthing ]
-                       ++ lib.optional cfg.useInotify pkgs.syncthing-inotify;
+    systemd.packages = [ pkgs.syncthing ];
 
     users = mkIf (cfg.user == defaultUser) {
       extraUsers."${defaultUser}" =
@@ -125,7 +124,6 @@ in {
           STNOUPGRADE = "yes";
           inherit (cfg) all_proxy;
         } // config.networking.proxy.envVars;
-        wants = mkIf cfg.useInotify [ "syncthing-inotify.service" ];
         wantedBy = [ "multi-user.target" ];
         serviceConfig = {
           Restart = "on-failure";
@@ -141,20 +139,6 @@ in {
       syncthing-resume = {
         wantedBy = [ "suspend.target" ];
       };
-
-      syncthing-inotify = mkIf (cfg.systemService && cfg.useInotify) {
-        description = "Syncthing Inotify File Watcher service";
-        after = [ "network.target" "syncthing.service" ];
-        requires = [ "syncthing.service" ];
-        wantedBy = [ "multi-user.target" ];
-        serviceConfig = {
-          SuccessExitStatus = "2";
-          RestartForceExitStatus = "3";
-          Restart = "on-failure";
-          User = cfg.user;
-          ExecStart = "${pkgs.syncthing-inotify.bin}/bin/syncthing-inotify -home=${cfg.dataDir} -logflags=0";
-        };
-      };
     };
   };
 }
diff --git a/pkgs/applications/misc/qsyncthingtray/default.nix b/pkgs/applications/misc/qsyncthingtray/default.nix
index 763435da564..88628c63c9c 100644
--- a/pkgs/applications/misc/qsyncthingtray/default.nix
+++ b/pkgs/applications/misc/qsyncthingtray/default.nix
@@ -1,7 +1,7 @@
 { mkDerivation, stdenv, lib, fetchFromGitHub, fetchpatch, procps ? null
 , qtbase, qtwebengine, qtwebkit
 , cmake
-, syncthing, syncthing-inotify ? null
+, syncthing
 , preferQWebView ? false
 , preferNative   ? true }:
 
@@ -34,7 +34,6 @@ mkDerivation rec {
     ${lib.optionalString stdenv.isLinux ''
       substituteInPlace includes/platforms/linux/posixUtils.hpp \
         --replace '"/usr/local/bin/syncthing"'         '"${syncthing}/bin/syncthing"' \
-        --replace '"/usr/local/bin/syncthing-inotify"' '"${syncthing-inotify}/bin/syncthing-inotify"' \
         --replace '"pgrep -x'                          '"${procps}/bin/pgrep -x'
     ''}
 
diff --git a/pkgs/applications/networking/syncthing/inotify-deps.nix b/pkgs/applications/networking/syncthing/inotify-deps.nix
deleted file mode 100644
index e5e554db67b..00000000000
--- a/pkgs/applications/networking/syncthing/inotify-deps.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file was generated by https://github.com/kamilchm/go2nix v1.2.0
-[
-  {
-    goPackagePath = "github.com/syncthing/syncthing";
-    fetch = {
-      type = "git";
-      url = "https://github.com/syncthing/syncthing";
-      rev = "d0061c172caecd3baf61f3ff720f56fdb805186e";
-      sha256 = "08cn0ym4arjppbnfn2b37crarwmiqbj4yjr7kinhdxx9gqm5wkj1";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/sys";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/sys";
-      rev = "fb4cac33e3196ff7f507ab9b2d2a44b0142f5b5a";
-      sha256 = "1y5lx3f7rawfxrqg0s2ndgbjjjaml3rn3f27h9w9c5mw3xk7lrgj";
-    };
-  }
-]
diff --git a/pkgs/applications/networking/syncthing/inotify.nix b/pkgs/applications/networking/syncthing/inotify.nix
deleted file mode 100644
index e33501a1715..00000000000
--- a/pkgs/applications/networking/syncthing/inotify.nix
+++ /dev/null
@@ -1,37 +0,0 @@
-{ stdenv, buildGoPackage, fetchFromGitHub }:
-
-buildGoPackage rec {
-  name = "syncthing-inotify-${version}";
-  version = "0.8.6";
-
-  goPackagePath = "github.com/syncthing/syncthing-inotify";
-
-  src = fetchFromGitHub {
-    owner  = "syncthing";
-    repo   = "syncthing-inotify";
-    rev    = "v${version}";
-    sha256 = "0z1zpb7av4q5nj2d4yda9jcbjdz4yj3823c29y73yf0gfp26lppl";
-  };
-
-  goDeps = ./inotify-deps.nix;
-
-  postInstall = ''
-    mkdir -p $bin/lib/systemd/{system,user}
-
-    substitute $src/etc/linux-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/lib/systemd/user/syncthing-inotify.service \
-               --replace /usr/bin/syncthing-inotify $bin/bin/syncthing-inotify
-  '';
-
-  meta = with stdenv.lib; {
-    homepage = https://github.com/syncthing/syncthing-inotify;
-    description = "File watcher intended for use with Syncthing";
-    license = licenses.mpl20;
-    maintainers = with maintainers; [ joko peterhoeg ];
-    platforms = platforms.unix;
-  };
-}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 9a537468db5..b91dc7535df 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -17525,8 +17525,6 @@ with pkgs;
 
   syncthing-gtk = python2Packages.callPackage ../applications/networking/syncthing-gtk { };
 
-  syncthing-inotify = callPackage ../applications/networking/syncthing/inotify.nix { };
-
   syncthing-tray = callPackage ../applications/misc/syncthing-tray { };
 
   # linux only by now