gimpPlugins.{bimp,gap}: fix build (#362644)

authored by Weijia Wang and committed by GitHub 5d946517 de7106e9

+16 -1
+16 -1
pkgs/applications/graphics/gimp/plugins/default.nix
··· 90 90 }) 91 91 ]; 92 92 93 + postPatch = '' 94 + substituteInPlace Makefile \ 95 + --replace-fail "gcc" "${stdenv.cc.targetPrefix}cc" 96 + ''; 97 + 93 98 nativeBuildInputs = with pkgs; [ which ]; 99 + 100 + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ 101 + "-Wno-error=incompatible-function-pointer-types" 102 + ]); 94 103 95 104 installFlags = [ 96 105 "SYSTEM_INSTALL_DIR=${placeholder "out"}/${gimp.targetPluginDir}/bimp" ··· 138 147 ffmpegSrc=$(realpath extern_libs/ffmpeg) 139 148 ''; 140 149 141 - configureFlags = ["--with-ffmpegsrcdir=${placeholder "ffmpegSrc"}"]; 150 + configureFlags = [ 151 + "--with-ffmpegsrcdir=${placeholder "ffmpegSrc"}" 152 + ] ++ lib.optionals (!stdenv.hostPlatform.isx86) [ 153 + "--disable-libavformat" 154 + ]; 142 155 143 156 hardeningDisable = [ "format" ]; 144 157 ··· 152 165 # The main code is given in GPLv3, but it has ffmpeg in it, and I think ffmpeg license 153 166 # falls inside "free". 154 167 license = with licenses; [ gpl3 free ]; 168 + # Depends on linux/soundcard.h 169 + platforms = platforms.linux; 155 170 }; 156 171 }; 157 172