diff --git a/pkgs/applications/misc/cataract/build.nix b/pkgs/applications/misc/cataract/build.nix index 0adab84830d2..2c369e64b5d2 100644 --- a/pkgs/applications/misc/cataract/build.nix +++ b/pkgs/applications/misc/cataract/build.nix @@ -26,6 +26,12 @@ stdenv.mkDerivation { sed -i 's|#include |#include |' src/jpeg-utils.cpp ''; + # Add workaround for -fno-common toolchains like upstream gcc-10 to + # avoid build failures like: + # ld: stats.o:/build/cataract-675e647/src/stats.h:24: multiple definition of + # `stats_images'; cgg.o:/build/cataract-675e647/src/stats.h:24: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + installPhase = '' mkdir $out/{bin,share} -p cp src/cgg{,-dirgen} $out/bin/