about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/graphics/gcolor2/default.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/applications/graphics/gcolor2/default.nix b/pkgs/applications/graphics/gcolor2/default.nix
index 0e79f981fbc08..5caa541670470 100644
--- a/pkgs/applications/graphics/gcolor2/default.nix
+++ b/pkgs/applications/graphics/gcolor2/default.nix
@@ -1,4 +1,4 @@
-{lib, stdenv, fetchurl, gtk2, perlPackages, pkg-config } :
+{lib, stdenv, fetchurl, fetchpatch, gtk2, perlPackages, pkg-config } :
 
 let version = "0.4"; in
 stdenv.mkDerivation {
@@ -16,9 +16,18 @@ stdenv.mkDerivation {
   '';
 
   # from https://github.com/PhantomX/slackbuilds/tree/master/gcolor2/patches
-  patches = if stdenv.hostPlatform.system == "x86_64-linux" then
+  patches = (if stdenv.hostPlatform.system == "x86_64-linux" then
         [ ./gcolor2-amd64.patch ] else
-        [ ];
+        [ ])
+   ++ [
+     # Pull patch pending upstream inclusion for -fno-common toolchains:
+     #   https://sourceforge.net/p/gcolor2/patches/8/
+     (fetchpatch {
+       name = "fno-common.patch";
+       url = "https://sourceforge.net/p/gcolor2/patches/8/attachment/0001-gcolor2-fix-build-on-gcc-10-fno-common.patch";
+       sha256 = "0187zc8as9g3d6mpm3isg87jfpryj0hajb4inwvii8gxrzbi5l5f";
+     })
+  ];
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ gtk2 ]