2018-06-27 13:47:21 -07:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, libnotify, librsvg, killall
|
|
|
|
, gtk3, libappindicator-gtk3, substituteAll, syncthing, wrapGAppsHook
|
|
|
|
, gnome3, buildPythonApplication, dateutil, pyinotify, pygobject3
|
2019-07-14 04:03:20 -07:00
|
|
|
, bcrypt, gobject-introspection, gsettings-desktop-schemas
|
2019-08-11 16:02:06 -07:00
|
|
|
, pango, gdk-pixbuf, atk }:
|
2017-11-24 11:56:10 -08:00
|
|
|
|
2018-01-25 21:24:48 -08:00
|
|
|
buildPythonApplication rec {
|
2020-03-13 21:32:32 -07:00
|
|
|
version = "0.9.4.4";
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "syncthing-gtk";
|
2017-11-24 11:56:10 -08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "syncthing";
|
|
|
|
repo = "syncthing-gtk";
|
|
|
|
rev = "v${version}";
|
2020-03-13 21:32:32 -07:00
|
|
|
sha256 = "0nc0wd7qvyri7841c3dd9in5d7367hys0isyw8znv5fj4c0a6v1f";
|
2017-11-24 11:56:10 -08:00
|
|
|
};
|
|
|
|
|
2018-01-25 21:21:18 -08:00
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
|
|
|
# For setup hook populating GI_TYPELIB_PATH
|
2018-12-02 03:41:15 -08:00
|
|
|
gobject-introspection
|
2019-08-11 16:02:06 -07:00
|
|
|
pango gdk-pixbuf atk libnotify
|
2018-01-25 21:21:18 -08:00
|
|
|
];
|
2017-11-24 13:52:57 -08:00
|
|
|
|
|
|
|
buildInputs = [
|
2018-02-23 09:48:15 -08:00
|
|
|
gtk3 librsvg libappindicator-gtk3
|
|
|
|
libnotify gnome3.adwaita-icon-theme
|
2017-11-24 13:52:57 -08:00
|
|
|
# Schemas with proxy configuration
|
2019-04-16 17:38:26 -07:00
|
|
|
gsettings-desktop-schemas
|
2017-11-24 11:56:10 -08:00
|
|
|
];
|
|
|
|
|
2018-01-25 21:24:48 -08:00
|
|
|
propagatedBuildInputs = [
|
2017-11-24 16:35:50 -08:00
|
|
|
dateutil pyinotify pygobject3 bcrypt
|
2017-11-24 13:52:57 -08:00
|
|
|
];
|
2017-11-24 11:56:10 -08:00
|
|
|
|
2017-11-24 16:33:24 -08:00
|
|
|
patches = [
|
2018-01-25 21:10:54 -08:00
|
|
|
(substituteAll {
|
|
|
|
src = ./paths.patch;
|
2018-06-27 13:47:21 -07:00
|
|
|
killall = "${killall}/bin/killall";
|
2018-01-25 21:10:54 -08:00
|
|
|
syncthing = "${syncthing}/bin/syncthing";
|
|
|
|
})
|
2017-11-24 16:33:24 -08:00
|
|
|
];
|
|
|
|
|
2020-03-13 21:32:32 -07:00
|
|
|
# repo doesn't have any tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2018-06-14 08:38:06 -07:00
|
|
|
setupPyBuildFlags = [ "build_py" "--nofinddaemon" "--nostdownloader" ];
|
|
|
|
|
2017-11-24 16:33:24 -08:00
|
|
|
postPatch = ''
|
2017-11-24 11:56:10 -08: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-24 16:33:24 -08:00
|
|
|
substituteInPlace syncthing_gtk/uisettingsdialog.py --replace "/usr/share" "$out/share"
|
2017-11-24 11:56:10 -08: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-25 21:10:54 -08:00
|
|
|
description = "GTK3 & python based GUI for Syncthing";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/syncthing/syncthing-gtk";
|
2017-11-24 11:56:10 -08:00
|
|
|
license = licenses.gpl2;
|
2020-10-18 13:14:13 -07:00
|
|
|
broken = true;
|
2018-06-14 08:38:06 -07:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
platforms = syncthing.meta.platforms;
|
2017-11-24 11:56:10 -08:00
|
|
|
};
|
|
|
|
}
|