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

57 lines
1.9 KiB
Nix
Raw Normal View History

2018-02-23 18:48:15 +01:00
{ stdenv, fetchFromGitHub, libnotify, librsvg, darwin, psmisc, gtk3, libappindicator-gtk3, substituteAll, syncthing, wrapGAppsHook, gnome3, buildPythonApplication, dateutil, pyinotify, pygobject3, bcrypt, gobjectIntrospection }:
2018-01-26 06:24:48 +01:00
buildPythonApplication rec {
2018-02-23 18:48:15 +01:00
version = "0.9.3.1";
name = "syncthing-gtk-${version}";
src = fetchFromGitHub {
owner = "syncthing";
repo = "syncthing-gtk";
rev = "v${version}";
2018-02-23 18:48:15 +01:00
sha256 = "15bh9i0j0g7hrqsz22px8g2bg0xj4lsn81rziznh9fxxx5b9v9bb";
};
nativeBuildInputs = [
wrapGAppsHook
# For setup hook populating GI_TYPELIB_PATH
gobjectIntrospection
];
2017-11-24 22:52:57 +01:00
buildInputs = [
2018-02-23 18:48:15 +01:00
gtk3 librsvg libappindicator-gtk3
libnotify gnome3.adwaita-icon-theme
2017-11-24 22:52:57 +01:00
# Schemas with proxy configuration
gnome3.gsettings-desktop-schemas
];
2018-01-26 06:24:48 +01:00
propagatedBuildInputs = [
2017-11-25 01:35:50 +01:00
dateutil pyinotify pygobject3 bcrypt
2017-11-24 22:52:57 +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;
2018-02-23 18:48:15 +01:00
killall = "${if stdenv.isDarwin then darwin.shell_cmds else psmisc}/bin/killall";
2018-01-26 06:10:54 +01:00
syncthing = "${syncthing}/bin/syncthing";
})
2017-11-25 01:33:24 +01: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 01:33:24 +01: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 stdenv.lib; {
2018-01-26 06:10:54 +01:00
description = "GTK3 & python based GUI for Syncthing";
maintainers = with maintainers; [ ];
platforms = syncthing.meta.platforms;
2018-01-26 06:10:54 +01:00
homepage = https://github.com/syncthing/syncthing-gtk;
license = licenses.gpl2;
};
}