summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-06-05 19:42:55 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-06-05 19:42:55 +0100
commit8b7b76a61258cda2407cbf32f3e6b0ade6b9482d (patch)
treebb429dd23fe8926409a74078140d9692031cc0c4 /pkgs/applications/science
parent49c4223e984aef1e78d0073cee112c66b23381fa (diff)
downloadnixpkgs-8b7b76a61258cda2407cbf32f3e6b0ade6b9482d.tar
nixpkgs-8b7b76a61258cda2407cbf32f3e6b0ade6b9482d.tar.gz
nixpkgs-8b7b76a61258cda2407cbf32f3e6b0ade6b9482d.tar.bz2
nixpkgs-8b7b76a61258cda2407cbf32f3e6b0ade6b9482d.tar.lz
nixpkgs-8b7b76a61258cda2407cbf32f3e6b0ade6b9482d.tar.xz
nixpkgs-8b7b76a61258cda2407cbf32f3e6b0ade6b9482d.tar.zst
nixpkgs-8b7b76a61258cda2407cbf32f3e6b0ade6b9482d.zip
geda: pull upstream fixes for -fno-common toolchains
Without the change builda fails on upstream gcc-10 as:

    ld: gattrib/src/../include/globals.h:97:
      multiple definition of `window'; gattrib/src/../include/globals.h:97: first defined here
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/electronics/geda/default.nix16
1 files changed, 15 insertions, 1 deletions
diff --git a/pkgs/applications/science/electronics/geda/default.nix b/pkgs/applications/science/electronics/geda/default.nix
index cf98e6963e1..6b77f75b11b 100644
--- a/pkgs/applications/science/electronics/geda/default.nix
+++ b/pkgs/applications/science/electronics/geda/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, pkg-config, guile, gtk2, flex, gawk, perl }:
+{ lib, stdenv, fetchurl, fetchpatch, pkg-config, guile, gtk2, flex, gawk, perl }:
 
 stdenv.mkDerivation {
   pname = "geda";
@@ -9,6 +9,20 @@ stdenv.mkDerivation {
     sha256 = "08dpa506xk4gjbbi8vnxcb640wq4ihlgmhzlssl52nhvxwx7gx5v";
   };
 
+  patches = [
+    # Pull upstream patch for -fno-common toolchains
+    (fetchpatch {
+      name = "fno-common-p1.patch";
+      url = "http://git.geda-project.org/geda-gaf/patch/?id=cb6bac898fe43c5a59b577123ba8698ec04deef6";
+      sha256 = "0njlh20qjrlqf5m8p92vmkl0jsm747f4mbqwvldnf8nd2j608nkq";
+    })
+    (fetchpatch {
+      name = "fno-common-p2.patch";
+      url = "http://git.geda-project.org/geda-gaf/patch/?id=7b9d523a3558290b4487c3ff9a4a5b43e8941158";
+      sha256 = "1z9gzz5ngsbq6c9dw2dfz7kpsq97zhs1ma9saxm7hiybwadbj18k";
+    })
+  ];
+
   configureFlags = [
     "--disable-update-xdg-database"
   ];