From 4e4ffb73e83b10212df42562db00108f8c195e0f Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 18 May 2022 08:01:16 +0100 Subject: [PATCH] ympd: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: CMakeFiles/ympd.dir/src/mpd_client.c.o:(.bss+0x0): multiple definition of `mpd'; CMakeFiles/ympd.dir/src/ympd.c.o:(.bss+0x20): first defined here --- pkgs/applications/audio/ympd/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/audio/ympd/default.nix b/pkgs/applications/audio/ympd/default.nix index 38c05276be4..218204d690a 100644 --- a/pkgs/applications/audio/ympd/default.nix +++ b/pkgs/applications/audio/ympd/default.nix @@ -18,11 +18,18 @@ stdenv.mkDerivation rec { sha256 = "1nvb19jd556v2h2bi7w4dcl507p3p8xvjkqfzrcsy7ccy3502brq"; }; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: CMakeFiles/ympd.dir/src/mpd_client.c.o:(.bss+0x0): multiple definition of `mpd'; + # CMakeFiles/ympd.dir/src/ympd.c.o:(.bss+0x20): first defined here + # Should be fixed by pending https://github.com/notandy/ympd/pull/191 (does not apply as is). + NIX_CFLAGS_COMPILE = "-fcommon"; + nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ libmpdclient openssl ]; meta = with lib; { - homepage = "https://www.ympd.org"; + homepage = "https://github.com/notandy/ympd"; description = "Standalone MPD Web GUI written in C, utilizing Websockets and Bootstrap/JS"; maintainers = [ maintainers.siddharthist ]; platforms = platforms.unix;