From e2d15bd6fed9a7d2d29599ccf98115090cc53c85 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 6 Jun 2022 18:04:31 +0100 Subject: [PATCH] galculator: pull fix pending upstream inclusion for -fno-common toolchains Without the change build fails on upstream gcc-10 as: ld: galculator-config_file.o:src/config_file.c:42: multiple definition of `prefs'; galculator-main.o:src/main.c:52: first defined here --- pkgs/applications/misc/galculator/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/galculator/default.nix b/pkgs/applications/misc/galculator/default.nix index 287a2fca3637..a96cbb566106 100644 --- a/pkgs/applications/misc/galculator/default.nix +++ b/pkgs/applications/misc/galculator/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub +{ lib, stdenv, fetchFromGitHub, fetchpatch , autoreconfHook, intltool , gtk, pkg-config, flex }: @@ -13,6 +13,16 @@ stdenv.mkDerivation rec { sha256 = "0q0hb62f266709ncyq96bpx4a40a1i6dc5869byvd7x285sx1c2w"; }; + patches = [ + # Pul patch pending upstream inclusion for -fno-common toolchain support: + # https://github.com/galculator/galculator/pull/45 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/galculator/galculator/commit/501a9e3feeb2e56889c0ff98ab6d0ab20348ccd6.patch"; + sha256 = "08c9d2b49a1mizgk7v37dp8r96x389zc13mzv4dcy16x448lhp67"; + }) + ]; + nativeBuildInputs = [ autoreconfHook intltool pkg-config ]; buildInputs = [ gtk flex ];