summary refs log tree commit diff
path: root/pkgs/applications/networking/syncthing-gtk
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2017-11-24 20:56:10 +0100
committerJan Tojnar <jtojnar@gmail.com>2018-01-26 06:13:44 +0100
commit0bbde0f026931a74b6c15487a0e6c24e13336a18 (patch)
treec21a2ac57399053bfe93854c6e22c26341dd4f93 /pkgs/applications/networking/syncthing-gtk
parent7fc2b096dca56e116daadeecdc9fe3a58da00cc9 (diff)
downloadnixlib-0bbde0f026931a74b6c15487a0e6c24e13336a18.tar
nixlib-0bbde0f026931a74b6c15487a0e6c24e13336a18.tar.gz
nixlib-0bbde0f026931a74b6c15487a0e6c24e13336a18.tar.bz2
nixlib-0bbde0f026931a74b6c15487a0e6c24e13336a18.tar.lz
nixlib-0bbde0f026931a74b6c15487a0e6c24e13336a18.tar.xz
nixlib-0bbde0f026931a74b6c15487a0e6c24e13336a18.tar.zst
nixlib-0bbde0f026931a74b6c15487a0e6c24e13336a18.zip
pythonPackages.syncthing-gtk: move to pkgs/applications/networking
Diffstat (limited to 'pkgs/applications/networking/syncthing-gtk')
-rw-r--r--pkgs/applications/networking/syncthing-gtk/default.nix41
1 files changed, 41 insertions, 0 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;
+  };
+}