rocksndiamonds: pull upstream fix for -fno-common toolchains

Without the change build fails on upstream gcc-10 as:

ld: libgame/libgame.a(system.o):src/libgame/system.c:41: multiple definition of
`setup'; main.o:src/main.c:140: first defined here

+15 -1
+15 -1
pkgs/games/rocksndiamonds/default.nix
··· 1 - { lib, stdenv, fetchurl, makeDesktopItem, SDL2, SDL2_image, SDL2_mixer, SDL2_net }: 2 3 stdenv.mkDerivation rec { 4 pname = "rocksndiamonds"; ··· 8 url = "https://www.artsoft.org/RELEASES/unix/${pname}/rocksndiamonds-${version}.tar.gz"; 9 sha256 = "1k0m6l5g886d9mwwh6q0gw75qsb85mpf8i0rglh047app56nsk72"; 10 }; 11 12 desktopItem = makeDesktopItem { 13 name = "rocksndiamonds";
··· 1 + { lib, stdenv, fetchurl, fetchpatch, makeDesktopItem, SDL2, SDL2_image, SDL2_mixer, SDL2_net }: 2 3 stdenv.mkDerivation rec { 4 pname = "rocksndiamonds"; ··· 8 url = "https://www.artsoft.org/RELEASES/unix/${pname}/rocksndiamonds-${version}.tar.gz"; 9 sha256 = "1k0m6l5g886d9mwwh6q0gw75qsb85mpf8i0rglh047app56nsk72"; 10 }; 11 + 12 + patches = [ 13 + # Pull upstream fix for -fno-common toolchain. 14 + (fetchpatch { 15 + name = "fno-common-p1.patch"; 16 + url = "https://git.artsoft.org/?p=rocksndiamonds.git;a=patch;h=b4271393b10b7c664a58f3db7349a3875c1676fe"; 17 + sha256 = "0bdy4d2ril917radmm0c2yh2gqfyh7q1c8kahig5xknn2rkf2iac"; 18 + }) 19 + (fetchpatch { 20 + name = "fno-common-p2.patch"; 21 + url = "https://git.artsoft.org/?p=rocksndiamonds.git;a=patch;h=81dbde8a570a94dd2e938eff2f52dc5a3ecced21"; 22 + sha256 = "1mk5yb8pxrpxvvsxw3pjcbgx2c658baq9vmqqipbj5byhkkw7v2l"; 23 + }) 24 + ]; 25 26 desktopItem = makeDesktopItem { 27 name = "rocksndiamonds";