Merge pull request #25393 from avnik/fix/gimp

gimp: fix all plugins build

authored by Michael Raskin and committed by GitHub 6c149ee8 f3f38ecc

+16 -18
+16 -18
pkgs/applications/graphics/gimp/plugins/default.nix
··· 5 5 6 6 { pkgs, gimp }: 7 7 let 8 - inherit (pkgs) stdenv fetchurl pkgconfig glib fetchFromGitHub; 8 + inherit (pkgs) stdenv fetchurl pkgconfig intltool glib fetchFromGitHub; 9 9 inherit (gimp) targetPluginDir targetScriptDir; 10 10 11 11 pluginDerivation = a: stdenv.mkDerivation ({ ··· 23 23 } 24 24 // a 25 25 # don't call this gimp-* unless you want nix replace gimp by a plugin :-) 26 - // { name = "${a.name}-${gimp.name}-plugin"; } 26 + // { 27 + name = "${a.name}-${gimp.name}-plugin"; 28 + buildInputs = [ gimp gimp.gtk glib ] ++ (a.buildInputs or []); 29 + nativeBuildInputs = [ pkgconfig intltool ] ++ (a.nativeBuildInputs or []); 30 + } 27 31 ); 28 32 29 33 scriptDerivation = {name, src} : pluginDerivation { ··· 34 38 libLQR = pluginDerivation { 35 39 name = "liblqr-1-0.4.1"; 36 40 # required by lqrPlugin, you don't havet to install this lib explicitely 37 - buildInputs = [ gimp ] ++ gimp.nativeBuildInputs; 38 41 src = fetchurl { 39 42 url = http://registry.gimp.org/files/liblqr-1-0.4.1.tar.bz2; 40 43 sha256 = "02g90wag7xi5rjlmwq8h0qs666b1i2sa90s4303hmym40il33nlz"; ··· 48 51 Video 49 52 */ 50 53 name = "gap-2.6.0"; 51 - buildInputs = [ gimp pkgconfig glib pkgs.intltool gimp.gtk ] ++ gimp.nativeBuildInputs; 52 54 src = fetchurl { 53 55 url = http://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/gimp-gap-2.6.0.tar.bz2; 54 56 sha256 = "1jic7ixcmsn4kx2cn32nc5087rk6g8xsrz022xy11yfmgvhzb0ql"; ··· 73 75 Filters/Generic/FFT Inverse 74 76 */ 75 77 name = "fourier-0.4.1"; 76 - buildInputs = [ gimp pkgs.fftw pkgconfig glib] ++ gimp.nativeBuildInputs; 78 + buildInputs = with pkgs; [ fftw ]; 77 79 postInstall = "fail"; 78 80 installPhase = "installPlugins fourier"; 79 81 src = fetchurl { ··· 87 89 Blur/Focus Blur 88 90 */ 89 91 name = "focusblur-3.2.6"; 90 - buildInputs = [ gimp pkgconfig pkgs.fftwSinglePrec ] ++ gimp.nativeBuildInputs; 92 + buildInputs = with pkgs; [ fftwSinglePrec ]; 91 93 patches = [ ./patches/focusblur-glib.patch ]; 92 94 postInstall = "fail"; 93 95 installPhase = "installPlugins src/focusblur"; ··· 105 107 Filters/Enhance/Smart remove selection 106 108 */ 107 109 name = "resynthesizer-0.16"; 108 - buildInputs = [ gimp pkgs.fftw pkgs.pkgconfig pkgs.gtk2 ] ++ gimp.nativeBuildInputs; 110 + buildInputs = with pkgs; [ fftw ]; 109 111 src = fetchurl { 110 112 url = http://www.logarithmic.net/pfh-files/resynthesizer/resynthesizer-0.16.tar.gz; 111 113 sha256 = "1k90a1jzswxmajn56rdxa4r60v9v34fmqsiwfdxqcvx3yf4yq96x"; ··· 125 127 Filters/Enhance/Smart remove selection 126 128 */ 127 129 name = "resynthesizer-2.0.1"; 128 - buildInputs = [ gimp pkgs.fftw pkgs.autoreconfHook pkgs.pkgconfig pkgs.gtk2 129 - pkgs.intltool 130 - ] 131 - ++ gimp.nativeBuildInputs; 130 + buildInputs = with pkgs; [ fftw ]; 131 + nativeBuildInputs = with pkgs; [ autoreconfHook ]; 132 132 makeFlags = "GIMP_LIBDIR=$out/lib/gimp/2.0/"; 133 133 src = fetchFromGitHub { 134 134 owner = "bootchk"; ··· 140 140 141 141 texturize = pluginDerivation { 142 142 name = "texturize-2.1"; 143 - buildInputs = [ gimp ] ++ gimp.nativeBuildInputs; 144 143 src = fetchurl { 145 144 url = mirror://sourceforge/gimp-texturize/texturize-2.1_src.tgz; 146 145 sha256 = "0cdjq25g3yfxx6bzx6nid21kq659s1vl9id4wxyjs2dhcv229cg3"; 147 146 }; 147 + buildInputs = with pkgs; [ perl ]; 148 148 patchPhase = '' 149 149 sed -i '/.*gimpimage_pdb.h.*/ d' src/*.c* 150 150 ''; ··· 156 156 Filters/Enhance/Wavelet sharpen 157 157 */ 158 158 name = "wavelet-sharpen-0.1.2"; 159 - buildInputs = [ gimp ] ++ gimp.nativeBuildInputs; 160 159 src = fetchurl { 161 160 url = http://registry.gimp.org/files/wavelet-sharpen-0.1.2.tar.gz; 162 161 sha256 = "0vql1k67i21g5ivaa1jh56rg427m0icrkpryrhg75nscpirfxxqw"; ··· 169 168 Layer/Liquid Rescale 170 169 */ 171 170 name = "lqr-plugin-0.6.1"; 172 - buildInputs = [ pkgconfig libLQR gimp ] ++ gimp.nativeBuildInputs; 171 + buildInputs = with pkgs; [ libLQR ]; 173 172 src = fetchurl { 174 173 url = http://registry.gimp.org/files/gimp-lqr-plugin-0.6.1.tar.bz2; 175 174 sha256 = "00hklkpcimcbpjly4rjhfipaw096cpy768g9wixglwrsyqhil7l9"; ··· 182 181 pluginDerivation rec { 183 182 inherit (pkgs.gmic) name src meta; 184 183 185 - nativeBuildInputs = [ pkgconfig ]; 186 - buildInputs = [ pkgs.fftw pkgs.opencv gimp ] ++ gimp.nativeBuildInputs; 184 + buildInputs = with pkgs; [ fftw opencv curl ]; 187 185 188 186 sourceRoot = "${name}/src"; 189 187 ··· 197 195 # or use the binary 198 196 ufraw = pluginDerivation rec { 199 197 name = "ufraw-0.19.2"; 200 - buildInputs = [pkgs.gtkimageview pkgs.lcms gimp] ++ gimp.nativeBuildInputs; 198 + buildInputs = with pkgs; [ gtkimageview lcms ]; 201 199 # --enable-mime - install mime files, see README for more information 202 200 # --enable-extras - build extra (dcraw, nikon-curve) executables 203 201 # --enable-dst-correction - enable DST correction for file timestamps. ··· 230 228 sha256 = "0zlmp9v732qmzj083mnk5z421s57mnckmpjhiw890wmmwzj2lhxz"; 231 229 }; 232 230 233 - buildInputs = [ gimp pkgconfig glib gimp.gtk pkgs.lensfun pkgs.exiv2 ]; 231 + buildInputs = with pkgs; [ lensfun exiv2 ]; 234 232 235 233 installPhase = " 236 234 installPlugins gimp-lensfun