about summary refs log tree commit diff
path: root/pkgs/applications/misc/galculator
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-06-06 18:04:31 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-06-06 18:04:31 +0100
commite2d15bd6fed9a7d2d29599ccf98115090cc53c85 (patch)
tree01177e16dc26c776edfc20d532f86ef36d5b751c /pkgs/applications/misc/galculator
parentef75dae045ab5777bf6ac3b7e3e6080ea85a865a (diff)
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
Diffstat (limited to 'pkgs/applications/misc/galculator')
-rw-r--r--pkgs/applications/misc/galculator/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/applications/misc/galculator/default.nix b/pkgs/applications/misc/galculator/default.nix
index 287a2fca3637c..a96cbb5661063 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 ];