diff --git a/pkgs/by-name/gr/grig/0001-Fix-grig-for-hamlib-4.6.x.patch b/pkgs/by-name/gr/grig/0001-Fix-grig-for-hamlib-4.6.x.patch new file mode 100644 index 000000000000..2ddbeb767705 --- /dev/null +++ b/pkgs/by-name/gr/grig/0001-Fix-grig-for-hamlib-4.6.x.patch @@ -0,0 +1,56 @@ +diff --git a/src/main.c b/src/main.c +index d16a7f7..2c596e9 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -125,7 +125,7 @@ static gint grig_app_delete (GtkWidget *, GdkEvent *, gpointer); + static void grig_app_destroy (GtkWidget *, gpointer); + static void grig_show_help (void); + static void grig_show_version (void); +-static gint grig_list_add (const struct rig_caps *, void *); ++static gint grig_list_add (struct rig_caps *, void *); + static gint grig_list_compare (gconstpointer, gconstpointer); + static void grig_sig_handler (int sig); + +@@ -729,7 +729,7 @@ grig_list_rigs () + * \sa grig_list_rigs, grig_list_compare + */ + static gint +-grig_list_add (const struct rig_caps *caps, void *array) ++grig_list_add (struct rig_caps *caps, void *array) + { + grig_rig_info_t *info; + +diff --git a/src/rig-selector.c b/src/rig-selector.c +index 425d41a..e040c0e 100644 +--- a/src/rig-selector.c ++++ b/src/rig-selector.c +@@ -46,7 +46,7 @@ static void add (GtkWidget *, gpointer); + static void delete (GtkWidget *, gpointer); + static void edit (GtkWidget *, gpointer); + static void cancel (GtkWidget *, gpointer); +-static void connect (GtkWidget *, gpointer); ++static void connectrig (GtkWidget *, gpointer); + static void selection_changed (GtkTreeSelection *sel, gpointer data); + + static void render_civ (GtkTreeViewColumn *col, +@@ -191,7 +191,7 @@ rig_selector_execute () + g_signal_connect (G_OBJECT (cancbut), "clicked", + G_CALLBACK (cancel), window); + g_signal_connect (G_OBJECT (conbut), "clicked", +- G_CALLBACK (connect), window); ++ G_CALLBACK (connectrig), window); + g_signal_connect (G_OBJECT (delbut), "clicked", + G_CALLBACK (delete), NULL); + g_signal_connect (G_OBJECT (newbut), "clicked", +@@ -439,7 +439,7 @@ static void cancel (GtkWidget *button, gpointer window) + * simply destroys the rig selector window and whereby control is returned + * to the main() function. + */ +-static void connect (GtkWidget *button, gpointer window) ++static void connectrig (GtkWidget *button, gpointer window) + { + + +-- +2.47.0 + diff --git a/pkgs/by-name/gr/grig/package.nix b/pkgs/by-name/gr/grig/package.nix index 189eaeaa3639..d6dfabd09375 100644 --- a/pkgs/by-name/gr/grig/package.nix +++ b/pkgs/by-name/gr/grig/package.nix @@ -20,6 +20,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-OgIgHW9NMW/xSSti3naIR8AQWUtNSv5bYdOcObStBlM="; }; + patches = [ + # https://github.com/fillods/grig/issues/22 + ./0001-Fix-grig-for-hamlib-4.6.x.patch + ]; + nativeBuildInputs = [ autoreconfHook pkg-config