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