1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-11 07:04:28 +00:00
nixpkgs/pkgs/applications/networking/syncthing-gtk/default.nix

57 lines
1.8 KiB
Nix
Raw Normal View History

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