nixpkgs/pkgs/applications/networking/syncthing-gtk/default.nix

67 lines
2 KiB
Nix
Raw Permalink Normal View History

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