diff options
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r-- | pkgs/applications/graphics/gimp/plugins/default.nix | 34 | ||||
-rw-r--r-- | pkgs/applications/graphics/imagej/default.nix | 48 | ||||
-rw-r--r-- | pkgs/applications/graphics/mozjpeg/default.nix | 4 |
3 files changed, 66 insertions, 20 deletions
diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index cf36ac4a382..6b145ca09ee 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -5,7 +5,7 @@ { pkgs, gimp }: let - inherit (pkgs) stdenv fetchurl pkgconfig glib fetchFromGitHub; + inherit (pkgs) stdenv fetchurl pkgconfig intltool glib fetchFromGitHub; inherit (gimp) targetPluginDir targetScriptDir; pluginDerivation = a: stdenv.mkDerivation ({ @@ -23,7 +23,11 @@ let } // a # don't call this gimp-* unless you want nix replace gimp by a plugin :-) - // { name = "${a.name}-${gimp.name}-plugin"; } + // { + name = "${a.name}-${gimp.name}-plugin"; + buildInputs = [ gimp gimp.gtk glib ] ++ (a.buildInputs or []); + nativeBuildInputs = [ pkgconfig intltool ] ++ (a.nativeBuildInputs or []); + } ); scriptDerivation = {name, src} : pluginDerivation { @@ -34,7 +38,6 @@ let libLQR = pluginDerivation { name = "liblqr-1-0.4.1"; # required by lqrPlugin, you don't havet to install this lib explicitely - buildInputs = [ gimp ] ++ gimp.nativeBuildInputs; src = fetchurl { url = http://registry.gimp.org/files/liblqr-1-0.4.1.tar.bz2; sha256 = "02g90wag7xi5rjlmwq8h0qs666b1i2sa90s4303hmym40il33nlz"; @@ -48,7 +51,6 @@ rec { Video */ name = "gap-2.6.0"; - buildInputs = [ gimp pkgconfig glib pkgs.intltool gimp.gtk ] ++ gimp.nativeBuildInputs; src = fetchurl { url = http://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/gimp-gap-2.6.0.tar.bz2; sha256 = "1jic7ixcmsn4kx2cn32nc5087rk6g8xsrz022xy11yfmgvhzb0ql"; @@ -73,7 +75,7 @@ rec { Filters/Generic/FFT Inverse */ name = "fourier-0.4.1"; - buildInputs = [ gimp pkgs.fftw pkgconfig glib] ++ gimp.nativeBuildInputs; + buildInputs = with pkgs; [ fftw ]; postInstall = "fail"; installPhase = "installPlugins fourier"; src = fetchurl { @@ -87,7 +89,7 @@ rec { Blur/Focus Blur */ name = "focusblur-3.2.6"; - buildInputs = [ gimp pkgconfig pkgs.fftwSinglePrec ] ++ gimp.nativeBuildInputs; + buildInputs = with pkgs; [ fftwSinglePrec ]; patches = [ ./patches/focusblur-glib.patch ]; postInstall = "fail"; installPhase = "installPlugins src/focusblur"; @@ -105,7 +107,7 @@ rec { Filters/Enhance/Smart remove selection */ name = "resynthesizer-0.16"; - buildInputs = [ gimp pkgs.fftw pkgs.pkgconfig pkgs.gtk2 ] ++ gimp.nativeBuildInputs; + buildInputs = with pkgs; [ fftw ]; src = fetchurl { url = http://www.logarithmic.net/pfh-files/resynthesizer/resynthesizer-0.16.tar.gz; sha256 = "1k90a1jzswxmajn56rdxa4r60v9v34fmqsiwfdxqcvx3yf4yq96x"; @@ -125,10 +127,8 @@ rec { Filters/Enhance/Smart remove selection */ name = "resynthesizer-2.0.1"; - buildInputs = [ gimp pkgs.fftw pkgs.autoreconfHook pkgs.pkgconfig pkgs.gtk2 - pkgs.intltool - ] - ++ gimp.nativeBuildInputs; + buildInputs = with pkgs; [ fftw ]; + nativeBuildInputs = with pkgs; [ autoreconfHook ]; makeFlags = "GIMP_LIBDIR=$out/lib/gimp/2.0/"; src = fetchFromGitHub { owner = "bootchk"; @@ -140,11 +140,11 @@ rec { texturize = pluginDerivation { name = "texturize-2.1"; - buildInputs = [ gimp ] ++ gimp.nativeBuildInputs; src = fetchurl { url = mirror://sourceforge/gimp-texturize/texturize-2.1_src.tgz; sha256 = "0cdjq25g3yfxx6bzx6nid21kq659s1vl9id4wxyjs2dhcv229cg3"; }; + buildInputs = with pkgs; [ perl ]; patchPhase = '' sed -i '/.*gimpimage_pdb.h.*/ d' src/*.c* ''; @@ -156,7 +156,6 @@ rec { Filters/Enhance/Wavelet sharpen */ name = "wavelet-sharpen-0.1.2"; - buildInputs = [ gimp ] ++ gimp.nativeBuildInputs; src = fetchurl { url = http://registry.gimp.org/files/wavelet-sharpen-0.1.2.tar.gz; sha256 = "0vql1k67i21g5ivaa1jh56rg427m0icrkpryrhg75nscpirfxxqw"; @@ -169,7 +168,7 @@ rec { Layer/Liquid Rescale */ name = "lqr-plugin-0.6.1"; - buildInputs = [ pkgconfig libLQR gimp ] ++ gimp.nativeBuildInputs; + buildInputs = with pkgs; [ libLQR ]; src = fetchurl { url = http://registry.gimp.org/files/gimp-lqr-plugin-0.6.1.tar.bz2; sha256 = "00hklkpcimcbpjly4rjhfipaw096cpy768g9wixglwrsyqhil7l9"; @@ -182,8 +181,7 @@ rec { pluginDerivation rec { inherit (pkgs.gmic) name src meta; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ pkgs.fftw pkgs.opencv gimp ] ++ gimp.nativeBuildInputs; + buildInputs = with pkgs; [ fftw opencv curl ]; sourceRoot = "${name}/src"; @@ -197,7 +195,7 @@ rec { # or use the binary ufraw = pluginDerivation rec { name = "ufraw-0.19.2"; - buildInputs = [pkgs.gtkimageview pkgs.lcms gimp] ++ gimp.nativeBuildInputs; + buildInputs = with pkgs; [ gtkimageview lcms ]; # --enable-mime - install mime files, see README for more information # --enable-extras - build extra (dcraw, nikon-curve) executables # --enable-dst-correction - enable DST correction for file timestamps. @@ -230,7 +228,7 @@ rec { sha256 = "0zlmp9v732qmzj083mnk5z421s57mnckmpjhiw890wmmwzj2lhxz"; }; - buildInputs = [ gimp pkgconfig glib gimp.gtk pkgs.lensfun pkgs.exiv2 ]; + buildInputs = with pkgs; [ lensfun exiv2 ]; installPhase = " installPlugins gimp-lensfun diff --git a/pkgs/applications/graphics/imagej/default.nix b/pkgs/applications/graphics/imagej/default.nix new file mode 100644 index 00000000000..673361c734e --- /dev/null +++ b/pkgs/applications/graphics/imagej/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl, jre, unzip, makeWrapper }: + +# Note: +# - User config dir is hard coded by upstream to $HOME/.imagej on linux systems +# and to $HOME/Library/Preferences on macOS. +# (The current trend appears to be to use $HOME/.config/imagej +# on linux systems, but we here do not attempt to fix it.) + +let + imagej150 = stdenv.mkDerivation rec { + name = "imagej-${version}"; + version = "150"; + + src = fetchurl { + url = "http://wsr.imagej.net/distros/cross-platform/ij150.zip"; + sha256 = "97aba6fc5eb908f5160243aebcdc4965726693cb1353d9c0d71b8f5dd832cb7b"; + }; + buildInputs = [ unzip makeWrapper ]; + inherit jre; + + # JAR files that are intended to be used by other packages + # should go to $out/share/java. + # (Some uses ij.jar as a library not as a standalone program.) + installPhase = '' + mkdir -p $out/share/java + # Read permisssion suffices for the jar and others. + # Simple cp shall clear suid bits, if any. + cp ij.jar $out/share/java + cp -dR luts macros plugins $out/share + mkdir $out/bin + makeWrapper ${jre}/bin/java $out/bin/imagej \ + --add-flags "-jar $out/share/java/ij.jar -ijpath $out/share" + ''; + meta = with stdenv.lib; { + homepage = https://imagej.nih.gov/ij/; + description = "Image processing and analysis in Java"; + longDescription = '' + ImageJ is a public domain Java image processing program + inspired by NIH Image for the Macintosh. + It runs on any computer with a Java 1.4 or later virtual machine. + ''; + license = licenses.publicDomain; + platforms = with platforms; linux ++ darwin; + maintainers = with maintainers; [ yuriaisaka ]; + }; + }; +in + imagej150 diff --git a/pkgs/applications/graphics/mozjpeg/default.nix b/pkgs/applications/graphics/mozjpeg/default.nix index 1b082de98bc..0ca997adb78 100644 --- a/pkgs/applications/graphics/mozjpeg/default.nix +++ b/pkgs/applications/graphics/mozjpeg/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, file, pkgconfig, libpng, nasm }: stdenv.mkDerivation rec { - version = "3.1"; + version = "3.2"; name = "mozjpeg-${version}"; src = fetchurl { url = "https://github.com/mozilla/mozjpeg/releases/download/v${version}/mozjpeg-${version}-release-source.tar.gz"; - sha256 = "07vs0xq9di7bv3y68daig8dvxvjqrn8a5na702gj3nn58a1xivfy"; + sha256 = "0wvv5qh1jasz8apq93c3j9d5wd22j7lld9dr06p76yj4mpnc3v4a"; }; postPatch = '' |