From 2f9d125d5820ead05c19aa2eeb1a695451958b64 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 8 Jun 2022 09:03:34 +0100 Subject: [PATCH] gpredict: pull upstream fix for -fno-common toolchains Without the change build fails on upstream gcc-10 as: ld: save-pass.o:src/qth-data.h:36: multiple definition of `qth_data_type'; gtk-azel-plot.o:src/qth-data.h:36: first defined here --- .../science/astronomy/gpredict/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/astronomy/gpredict/default.nix b/pkgs/applications/science/astronomy/gpredict/default.nix index 3f82ff7b52a8..1fd2d4ac2adc 100644 --- a/pkgs/applications/science/astronomy/gpredict/default.nix +++ b/pkgs/applications/science/astronomy/gpredict/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkg-config, intltool +{ lib, stdenv, fetchurl, fetchpatch, pkg-config, intltool , gtk3, glib, curl, goocanvas2, gpsd , hamlib, wrapGAppsHook }: @@ -14,6 +14,16 @@ in stdenv.mkDerivation { sha256 = "0hwf97kng1zy8rxyglw04x89p0bg07zq30hgghm20yxiw2xc8ng7"; }; + patches = [ + # Pull upstream fix for -fno-common toolchains: + # https://github.com/csete/gpredict/issues/195 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/csete/gpredict/commit/c565bb3d48777bfe17114b5d01cd81150521f056.patch"; + sha256 = "1jhy9hpqlachq32bkij60q3dxkgi1kkr80rm29jjxqpmambf406a"; + }) + ]; + nativeBuildInputs = [ pkg-config intltool wrapGAppsHook ]; buildInputs = [ curl glib gtk3 goocanvas2 gpsd hamlib ];