1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-22 22:16:09 -04:00
nixpkgs/pkgs/applications/networking/syncthing-gtk/default.nix

57 lines
1.8 KiB
Nix
Raw Normal View History

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