Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '0f21306ca3af2bc94a452ac8c414cdbe36703be2' into gcc-7
- Loading branch information
Showing
14 changed files
with
312 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ stdenv, fetchurl, alsaLib | ||
, version ? "1.7.1" | ||
, sourceSha256 ? "051mv6f13c8y13c1iv3279k1hhzpz4fm9sfczhgp9sim2bjdj055" | ||
}: | ||
stdenv.mkDerivation { | ||
name = "pmidi-${version}"; | ||
|
||
src = fetchurl { | ||
url = "mirror://sourceforge/pmidi/${version}/pmidi-${version}.tar.gz"; | ||
sha256 = sourceSha256; | ||
}; | ||
|
||
buildInputs = [ alsaLib ]; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = http://www.parabola.me.uk/alsa/pmidi.html; | ||
description = "A straightforward command line program to play midi files through the ALSA sequencer"; | ||
maintainers = with maintainers; [ lheckemann ]; | ||
license = licenses.gpl2; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ stdenv, fetchFromGitHub, libnotify, librsvg, psmisc, gtk3, substituteAll, syncthing, wrapGAppsHook, gnome3, buildPythonApplication, dateutil, pyinotify, pygobject3, bcrypt, gobjectIntrospection }: | ||
|
||
buildPythonApplication rec { | ||
version = "0.9.2.7"; | ||
name = "syncthing-gtk-${version}"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "syncthing"; | ||
repo = "syncthing-gtk"; | ||
rev = "v${version}"; | ||
sha256 = "08k7vkibia85klwjxbnzk67h4pphrizka5v9zxwvvv3cisjiclc2"; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
wrapGAppsHook | ||
# For setup hook populating GI_TYPELIB_PATH | ||
gobjectIntrospection | ||
]; | ||
|
||
buildInputs = [ | ||
gtk3 (librsvg.override { enableIntrospection = true; }) | ||
libnotify | ||
# Schemas with proxy configuration | ||
gnome3.gsettings_desktop_schemas | ||
]; | ||
|
||
propagatedBuildInputs = [ | ||
dateutil pyinotify pygobject3 bcrypt | ||
]; | ||
|
||
patches = [ | ||
./disable-syncthing-binary-configuration.patch | ||
(substituteAll { | ||
src = ./paths.patch; | ||
killall = "${psmisc}/bin/killall"; | ||
syncthing = "${syncthing}/bin/syncthing"; | ||
}) | ||
]; | ||
|
||
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" | ||
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; { | ||
description = "GTK3 & python based GUI for Syncthing"; | ||
maintainers = with maintainers; [ ]; | ||
platforms = syncthing.meta.platforms; | ||
homepage = https://github.com/syncthing/syncthing-gtk; | ||
license = licenses.gpl2; | ||
}; | ||
} |
77 changes: 77 additions & 0 deletions
77
pkgs/applications/networking/syncthing-gtk/disable-syncthing-binary-configuration.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- a/find-daemon.glade | ||
+++ b/find-daemon.glade | ||
@@ -112,6 +112,7 @@ | ||
<object class="GtkEntry" id="vsyncthing_binary"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">True</property> | ||
+ <property name="sensitive">False</property> | ||
<property name="margin_right">20</property> | ||
<signal name="changed" handler="cb_check_value" swapped="no"/> | ||
</object> | ||
@@ -126,6 +127,7 @@ | ||
<property name="label" translatable="yes">_Browse...</property> | ||
<property name="visible">True</property> | ||
<property name="can_focus">True</property> | ||
+ <property name="sensitive">False</property> | ||
<property name="receives_default">True</property> | ||
<property name="use_underline">True</property> | ||
<property name="yalign">0.51999998092651367</property> | ||
--- a/syncthing_gtk/configuration.py | ||
+++ b/syncthing_gtk/configuration.py | ||
@@ -168,6 +168,8 @@ | ||
yield k | ||
|
||
def get(self, key): | ||
+ if key == "syncthing_binary": | ||
+ return self.REQUIRED_KEYS[key][1] | ||
return self.values[key] | ||
|
||
def set(self, key, value): | ||
--- a/syncthing_gtk/finddaemondialog.py | ||
+++ b/syncthing_gtk/finddaemondialog.py | ||
@@ -163,7 +163,7 @@ | ||
self["lblDownloadProgress"].set_markup(_("Download failed.")) | ||
self["btDownload"].set_visible(True) | ||
self["pbDownload"].set_visible(False) | ||
- self["vsyncthing_binary"].set_sensitive(True) | ||
+ self["vsyncthing_binary"].set_sensitive(False) | ||
self["btBrowse"].set_sensitive(True) | ||
self["btSave"].set_sensitive(True) | ||
|
||
@@ -179,7 +179,7 @@ | ||
|
||
def cb_extract_finished(self, downloader, *a): | ||
""" Called after extraction is finished """ | ||
- self["vsyncthing_binary"].set_sensitive(True) | ||
+ self["vsyncthing_binary"].set_sensitive(False) | ||
self["btBrowse"].set_sensitive(True) | ||
self["vsyncthing_binary"].set_text(downloader.get_target()) | ||
self["lblDownloadProgress"].set_markup("<b>" + _("Download finished.") + "</b>") | ||
--- a/syncthing_gtk/wizard.py | ||
+++ b/syncthing_gtk/wizard.py | ||
@@ -60,7 +60,6 @@ | ||
self.quit_button.connect("clicked", lambda *a : self.emit("cancel")) | ||
# Pages | ||
self.add_page(IntroPage(self)) | ||
- self.add_page(FindDaemonPage()) | ||
self.add_page(GenerateKeysPage()) | ||
self.add_page(HttpSettingsPage()) | ||
self.add_page(SaveSettingsPage()) | ||
--- a/ui-settings.glade | ||
+++ b/ui-settings.glade | ||
@@ -943,6 +943,7 @@ | ||
<property name="label" translatable="yes">_Browse...</property> | ||
<property name="visible">True</property> | ||
<property name="can_focus">True</property> | ||
+ <property name="sensitive">False</property> | ||
<property name="receives_default">True</property> | ||
<property name="use_underline">True</property> | ||
<property name="yalign">0.51999998092651367</property> | ||
@@ -974,6 +975,7 @@ | ||
<object class="GtkEntry" id="vsyncthing_binary"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">True</property> | ||
+ <property name="sensitive">False</property> | ||
<property name="hexpand">True</property> | ||
<signal name="changed" handler="cb_check_value" swapped="no"/> | ||
</object> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- a/syncthing_gtk/configuration.py | ||
+++ b/syncthing_gtk/configuration.py | ||
@@ -30,7 +30,7 @@ | ||
"autokill_daemon" : (int, 2), # 0 - never kill, 1 - always kill, 2 - ask | ||
"daemon_priority" : (int, 0), # uses nice values | ||
"max_cpus" : (int, 0), # 0 for all cpus | ||
- "syncthing_binary" : (str, "/usr/bin/syncthing"), | ||
+ "syncthing_binary" : (str, "@syncthing@"), | ||
"syncthing_arguments" : (str, ""), | ||
"minimize_on_start" : (bool, False), | ||
"folder_as_path" : (bool, True), | ||
--- a/syncthing_gtk/tools.py | ||
+++ b/syncthing_gtk/tools.py | ||
@@ -303,7 +303,7 @@ | ||
return False | ||
# signal 0 doesn't kill anything, but killall exits with 1 if | ||
# named process is not found | ||
- p = Popen(["killall", "-u", os.environ["USER"], "-q", "-s", "0", "syncthing"]) | ||
+ p = Popen(["@killall@", "-u", os.environ["USER"], "-q", "-s", "0", "syncthing"]) | ||
p.communicate() | ||
return p.returncode == 0 | ||
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.