From 338484a75e756e7430d3edec20dcf8c3fff13992 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 3 Jun 2022 14:44:10 +0100 Subject: [PATCH] zynaddsubfx: pull upstream fix for -fno-common (mruby-zest) Without the change internal dependency mruby-zest fails to build on -fno-common toolchain as: ld: libmruby.a(nvg_context.o):mruby-nanovg/src/nvg_context.c:217: multiple definition of `mrb_nvg_context_type'; libmruby.a(gem.o):mruby-widget-lib/src/gem.c:293: first defined here --- .../audio/zynaddsubfx/mruby-zest/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix b/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix index 9dd5b583817..1c9cb0a463d 100644 --- a/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix +++ b/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix @@ -1,5 +1,6 @@ { lib, stdenv , fetchFromGitHub +, fetchpatch , bison , git , python2 @@ -71,6 +72,14 @@ stdenv.mkDerivation rec { patches = [ ./force-gcc-as-linker.patch ./system-libuv.patch + + # Pull upstream fix for -fno-common toolchains: + # https://github.com/mruby-zest/mruby-zest-build/issues/25 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/mruby-zest/mruby-zest-build/commit/4eb88250f22ee684acac95d4d1f114df504e37a7.patch"; + sha256 = "0wg7qy1vg0mzcxagf35bv35dlr0q17pxjicigpf86yqppvgrzrsb"; + }) ]; # Add missing dependencies of deps/mruby-dir-glob/mrbgem.rake