summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/networking/syncthing-gtk/default.nix41
-rw-r--r--pkgs/top-level/all-packages.nix2
-rw-r--r--pkgs/top-level/python-packages.nix42
3 files changed, 45 insertions, 40 deletions
diff --git a/pkgs/applications/networking/syncthing-gtk/default.nix b/pkgs/applications/networking/syncthing-gtk/default.nix
new file mode 100644
index 000000000000..f47fd2d0fd64
--- /dev/null
+++ b/pkgs/applications/networking/syncthing-gtk/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchFromGitHub, libnotify, librsvg, psmisc, gtk3, syncthing, python2Packages }:
+
+python2Packages.buildPythonApplication rec {
+  version = "0.9.2.3";
+  name = "syncthing-gtk-${version}";
+
+  src = fetchFromGitHub {
+    owner = "syncthing";
+    repo = "syncthing-gtk";
+    rev = "v${version}";
+    sha256 = "0chl0f0kp6z0z00d1f3xjlicjfr9rzabw39wmjr66fwb5w5hcc42";
+  };
+
+  propagatedBuildInputs = with python2Packages; [
+    syncthing dateutil pyinotify libnotify
+    (librsvg.override { withGTK = true; })
+    psmisc pygobject3 gtk3
+  ];
+
+  preFixup = ''
+    wrapProgram $out/bin/syncthing-gtk \
+      --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+      --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH"
+  '';
+
+  patchPhase = ''
+    substituteInPlace setup.py --replace "version = get_version()" "version = '${version}'"
+    substituteInPlace scripts/syncthing-gtk --replace "/usr/share" "$out/share"
+    substituteInPlace syncthing_gtk/app.py --replace "/usr/share" "$out/share"
+    substituteInPlace syncthing_gtk/wizard.py --replace "/usr/share" "$out/share"
+    substituteInPlace syncthing-gtk.desktop --replace "/usr/bin/syncthing-gtk" "$out/bin/syncthing-gtk"
+  '';
+
+  meta = with stdenv.lib; {
+    description = " GTK3 & python based GUI for Syncthing ";
+    maintainers = with maintainers; [ ];
+    platforms = syncthing.meta.platforms;
+    homepage = "https://github.com/syncthing/syncthing-gtk";
+    license = licenses.gpl2;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index a48f43fc9ffe..d86bc398230e 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -17189,6 +17189,8 @@ with pkgs;
 
   syncthing013 = callPackage ../applications/networking/syncthing013 { };
 
+  syncthing-gtk = callPackage ../applications/networking/syncthing-gtk { };
+
   syncthing-inotify = callPackage ../applications/networking/syncthing/inotify.nix { };
 
   syncthing-tray = callPackage ../applications/misc/syncthing-tray { };
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index e45418fba46d..4e55bfceecb9 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -17329,46 +17329,8 @@ in {
 
   sybil = callPackage ../development/python-modules/sybil { };
 
-  syncthing-gtk = buildPythonPackage rec {
-    version = "0.9.2.3";
-    name = "syncthing-gtk-${version}";
-    src = pkgs.fetchFromGitHub {
-      owner = "syncthing";
-      repo = "syncthing-gtk";
-      rev = "v${version}";
-      sha256 = "0chl0f0kp6z0z00d1f3xjlicjfr9rzabw39wmjr66fwb5w5hcc42";
-    };
-
-    disabled = isPy3k;
-
-    propagatedBuildInputs = with self; [ pkgs.syncthing dateutil pyinotify
-      pkgs.libnotify
-      (pkgs.librsvg.override { withGTK = true; })
-      pkgs.psmisc pygobject3 pkgs.gtk3
-    ];
-
-    preFixup = ''
-      wrapProgram $out/bin/syncthing-gtk \
-        --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
-        --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH"
-    '';
-
-    patchPhase = ''
-        substituteInPlace setup.py --replace "version = get_version()" "version = '${version}'"
-        substituteInPlace scripts/syncthing-gtk --replace "/usr/share" "$out/share"
-        substituteInPlace syncthing_gtk/app.py --replace "/usr/share" "$out/share"
-        substituteInPlace syncthing_gtk/wizard.py --replace "/usr/share" "$out/share"
-        substituteInPlace syncthing-gtk.desktop --replace "/usr/bin/syncthing-gtk" "$out/bin/syncthing-gtk"
-    '';
-
-    meta = {
-      description = " GTK3 & python based GUI for Syncthing ";
-      maintainers = with maintainers; [ ];
-      platforms = pkgs.syncthing.meta.platforms;
-      homepage = "https://github.com/syncthing/syncthing-gtk";
-      license = licenses.gpl2;
-    };
-  };
+  # legacy alias
+  syncthing-gtk = pkgs.syncthing-gtk;
 
   systemd = callPackage ../development/python-modules/systemd {
     inherit (pkgs) pkgconfig systemd;