2018-01-26 05:24:48 +00:00
|
|
|
{ stdenv, fetchFromGitHub, libnotify, librsvg, psmisc, gtk3, substituteAll, syncthing, wrapGAppsHook, gnome3, buildPythonApplication, dateutil, pyinotify, pygobject3, bcrypt, gobjectIntrospection }:
|
2017-11-24 19:56:10 +00:00
|
|
|
|
2018-01-26 05:24:48 +00:00
|
|
|
buildPythonApplication rec {
|
2017-11-25 00:35:50 +00:00
|
|
|
version = "0.9.2.7";
|
2017-11-24 19:56:10 +00:00
|
|
|
name = "syncthing-gtk-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "syncthing";
|
|
|
|
repo = "syncthing-gtk";
|
|
|
|
rev = "v${version}";
|
2017-11-25 00:35:50 +00:00
|
|
|
sha256 = "08k7vkibia85klwjxbnzk67h4pphrizka5v9zxwvvv3cisjiclc2";
|
2017-11-24 19:56:10 +00:00
|
|
|
};
|
|
|
|
|
2018-01-26 05:21:18 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
|
|
|
# For setup hook populating GI_TYPELIB_PATH
|
|
|
|
gobjectIntrospection
|
|
|
|
];
|
2017-11-24 21:52:57 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk3 (librsvg.override { enableIntrospection = true; })
|
2018-01-26 05:10:54 +00:00
|
|
|
libnotify
|
2017-11-24 21:52:57 +00:00
|
|
|
# Schemas with proxy configuration
|
2018-02-25 02:23:58 +00:00
|
|
|
gnome3.gsettings-desktop-schemas
|
2017-11-24 19:56:10 +00:00
|
|
|
];
|
|
|
|
|
2018-01-26 05:24:48 +00:00
|
|
|
propagatedBuildInputs = [
|
2017-11-25 00:35:50 +00:00
|
|
|
dateutil pyinotify pygobject3 bcrypt
|
2017-11-24 21:52:57 +00:00
|
|
|
];
|
2017-11-24 19:56:10 +00:00
|
|
|
|
2017-11-25 00:33:24 +00:00
|
|
|
patches = [
|
|
|
|
./disable-syncthing-binary-configuration.patch
|
2018-01-26 05:10:54 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./paths.patch;
|
|
|
|
killall = "${psmisc}/bin/killall";
|
|
|
|
syncthing = "${syncthing}/bin/syncthing";
|
|
|
|
})
|
2017-11-25 00:33:24 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2017-11-24 19:56:10 +00:00
|
|
|
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"
|
2017-11-25 00:33:24 +00:00
|
|
|
substituteInPlace syncthing_gtk/uisettingsdialog.py --replace "/usr/share" "$out/share"
|
2017-11-24 19:56:10 +00:00
|
|
|
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; {
|
2018-01-26 05:10:54 +00:00
|
|
|
description = "GTK3 & python based GUI for Syncthing";
|
2017-11-24 19:56:10 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
platforms = syncthing.meta.platforms;
|
2018-01-26 05:10:54 +00:00
|
|
|
homepage = https://github.com/syncthing/syncthing-gtk;
|
2017-11-24 19:56:10 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|