about summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r--pkgs/applications/graphics/ImageMagick/7.0.nix4
-rw-r--r--pkgs/applications/graphics/darktable/default.nix4
-rw-r--r--pkgs/applications/graphics/digikam/default.nix2
-rw-r--r--pkgs/applications/graphics/dosage/default.nix2
-rw-r--r--pkgs/applications/graphics/draftsight/default.nix4
-rw-r--r--pkgs/applications/graphics/epeg/default.nix31
-rw-r--r--pkgs/applications/graphics/geeqie/default.nix2
-rw-r--r--pkgs/applications/graphics/gimp/2.8.nix57
-rw-r--r--pkgs/applications/graphics/gimp/default.nix95
-rw-r--r--pkgs/applications/graphics/gimp/plugins/default.nix69
-rw-r--r--pkgs/applications/graphics/gimp/wrapper.nix7
-rw-r--r--pkgs/applications/graphics/goxel/default.nix6
-rw-r--r--pkgs/applications/graphics/goxel/disable-imgui_ini.patch13
-rw-r--r--pkgs/applications/graphics/inkscape/default.nix38
-rw-r--r--pkgs/applications/graphics/ocrad/default.nix2
-rw-r--r--pkgs/applications/graphics/openscad/default.nix28
-rw-r--r--pkgs/applications/graphics/panotools/default.nix2
-rw-r--r--pkgs/applications/graphics/pqiv/default.nix4
-rw-r--r--pkgs/applications/graphics/qtpfsgui/default.nix2
-rw-r--r--pkgs/applications/graphics/sane/xsane.nix6
-rw-r--r--pkgs/applications/graphics/scantailor/advanced.nix2
-rw-r--r--pkgs/applications/graphics/scantailor/default.nix2
-rw-r--r--pkgs/applications/graphics/shutter/default.nix5
-rw-r--r--pkgs/applications/graphics/ufraw/default.nix26
-rw-r--r--pkgs/applications/graphics/viewnior/default.nix2
-rw-r--r--pkgs/applications/graphics/xfig/default.nix2
26 files changed, 249 insertions, 168 deletions
diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix
index 410c74ac6cfa..65a3238ef571 100644
--- a/pkgs/applications/graphics/ImageMagick/7.0.nix
+++ b/pkgs/applications/graphics/ImageMagick/7.0.nix
@@ -14,8 +14,8 @@ let
     else throw "ImageMagick is not supported on this platform.";
 
   cfg = {
-    version = "7.0.7-27";
-    sha256 = "04v7m1s2a89xi57fpxbq30hzxqg3fawr3lms6wfmaq4j2ax0qw6k";
+    version = "7.0.7-29";
+    sha256 = "0jfpfydz50zxs776knz6w2f5g0l4nhivp9g1fz4cf5clgjcpa3z6";
     patches = [];
   };
 in
diff --git a/pkgs/applications/graphics/darktable/default.nix b/pkgs/applications/graphics/darktable/default.nix
index d81fea5ea398..4de49524f82f 100644
--- a/pkgs/applications/graphics/darktable/default.nix
+++ b/pkgs/applications/graphics/darktable/default.nix
@@ -6,12 +6,12 @@
 }:
 
 stdenv.mkDerivation rec {
-  version = "2.4.2";
+  version = "2.4.3";
   name = "darktable-${version}";
 
   src = fetchurl {
     url = "https://github.com/darktable-org/darktable/releases/download/release-${version}/darktable-${version}.tar.xz";
-    sha256 = "10asz918kv2248px3w9bn5k8cfrad5xrci58x9y61l0yf5hcpk0r";
+    sha256 = "1lq3xp7hhfhfwqrz0f2mrp3xywnpvb0nlw6lbm5cgx22s5xzri8x";
   };
 
   nativeBuildInputs = [ cmake ninja llvm pkgconfig intltool perl desktop-file-utils wrapGAppsHook ];
diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix
index 633a1d9bd6e6..5c6a4bab9306 100644
--- a/pkgs/applications/graphics/digikam/default.nix
+++ b/pkgs/applications/graphics/digikam/default.nix
@@ -116,7 +116,7 @@ mkDerivation rec {
   meta = with lib; {
     description = "Photo Management Program";
     license = licenses.gpl2;
-    homepage = http://www.digikam.org;
+    homepage = https://www.digikam.org;
     maintainers = with maintainers; [ the-kenny ];
     platforms = platforms.linux;
   };
diff --git a/pkgs/applications/graphics/dosage/default.nix b/pkgs/applications/graphics/dosage/default.nix
index f95370e39e72..4bc0e93a3b46 100644
--- a/pkgs/applications/graphics/dosage/default.nix
+++ b/pkgs/applications/graphics/dosage/default.nix
@@ -23,6 +23,6 @@ pythonPackages.buildPythonApplication rec {
 
   meta = {
     description = "A comic strip downloader and archiver";
-    homepage = http://dosage.rocks/;
+    homepage = https://dosage.rocks/;
   };
 }
diff --git a/pkgs/applications/graphics/draftsight/default.nix b/pkgs/applications/graphics/draftsight/default.nix
index 9ab43ff94337..b604099096ff 100644
--- a/pkgs/applications/graphics/draftsight/default.nix
+++ b/pkgs/applications/graphics/draftsight/default.nix
@@ -4,8 +4,6 @@
   libX11, libXcursor, libXrandr, libxcb, libXi, libSM, libICE,
   libXrender, libXcomposite }:
 
-assert stdenv.system == "x86_64-linux";
-
 let version = "2017-SP2"; in
 stdenv.mkDerivation {
   name = "draftsight-${version}";
@@ -71,6 +69,6 @@ stdenv.mkDerivation {
     homepage = https://www.3ds.com/products-services/draftsight-cad-software/;
     license = stdenv.lib.licenses.unfree;
     maintainers = with maintainers; [ hodapp ];
-    platforms = platforms.linux;
+    platforms = [ "x86_64-linux" ];
   };
 }
diff --git a/pkgs/applications/graphics/epeg/default.nix b/pkgs/applications/graphics/epeg/default.nix
new file mode 100644
index 000000000000..02528a43e31b
--- /dev/null
+++ b/pkgs/applications/graphics/epeg/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, pkgconfig, libtool, autoconf, automake
+, libjpeg, libexif
+}:
+
+stdenv.mkDerivation rec {
+  name = "epeg-0.9.1.042"; # version taken from configure.ac
+
+  src = fetchFromGitHub {
+    owner = "mattes";
+    repo = "epeg";
+    rev = "248ae9fc3f1d6d06e6062a1f7bf5df77d4f7de9b";
+    sha256 = "14ad33w3pxrg2yfc2xzyvwyvjirwy2d00889dswisq8b84cmxfia";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ pkgconfig libtool autoconf automake ];
+
+  propagatedBuildInputs = [ libjpeg libexif ];
+
+  preConfigure = ''
+    ./autogen.sh
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/mattes/epeg;
+    description = "Insanely fast JPEG/ JPG thumbnail scaling";
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ nh2 ];
+  };
+}
diff --git a/pkgs/applications/graphics/geeqie/default.nix b/pkgs/applications/graphics/geeqie/default.nix
index d034f5d64d93..a1ea88da84be 100644
--- a/pkgs/applications/graphics/geeqie/default.nix
+++ b/pkgs/applications/graphics/geeqie/default.nix
@@ -49,6 +49,6 @@ stdenv.mkDerivation rec {
     homepage = http://geeqie.sourceforge.net;
 
     maintainers = with maintainers; [ jfrankenau pSub ];
-    platforms = platforms.gnu;
+    platforms = platforms.gnu ++ platforms.linux;
   };
 }
diff --git a/pkgs/applications/graphics/gimp/2.8.nix b/pkgs/applications/graphics/gimp/2.8.nix
deleted file mode 100644
index 3802fff2ad21..000000000000
--- a/pkgs/applications/graphics/gimp/2.8.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, intltool, babl, gegl, gtk2, glib, gdk_pixbuf
-, pango, cairo, freetype, fontconfig, lcms, libpng, libjpeg, poppler, libtiff
-, webkit, libmng, librsvg, libwmf, zlib, libzip, ghostscript, aalib, jasper
-, python2Packages, libexif, gettext, xorg
-, AppKit, Cocoa, gtk-mac-integration }:
-
-let
-  inherit (python2Packages) pygtk wrapPython python;
-in stdenv.mkDerivation rec {
-  name = "gimp-${version}";
-  version = "2.8.22";
-
-  # This declarations for `gimp-with-plugins` wrapper,
-  # (used for determining $out/lib/gimp/${majorVersion}/ paths)
-  majorVersion = "2.0";
-  targetPluginDir = "$out/lib/gimp/${majorVersion}/plug-ins";
-  targetScriptDir = "$out/lib/gimp/${majorVersion}/scripts";
-
-  src = fetchurl {
-    url = "http://download.gimp.org/pub/gimp/v2.8/${name}.tar.bz2";
-    sha256 = "12k3lp938qdc9cqj29scg55f3bb8iav2fysd29w0s49bqmfa71wi";
-  };
-
-  buildInputs =
-    [ pkgconfig intltool babl gegl gtk2 glib gdk_pixbuf pango cairo
-      freetype fontconfig lcms libpng libjpeg poppler libtiff webkit
-      libmng librsvg libwmf zlib libzip ghostscript aalib jasper
-      python pygtk libexif gettext xorg.libXpm
-      wrapPython
-    ]
-    ++ stdenv.lib.optionals stdenv.isDarwin [ AppKit Cocoa gtk-mac-integration ];
-
-  pythonPath = [ pygtk ];
-
-  postFixup = ''
-    wrapPythonProgramsIn $out/lib/gimp/2.0/plug-ins/
-    wrapProgram $out/bin/gimp \
-      --prefix PYTHONPATH : "$PYTHONPATH" \
-      --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
-  '';
-
-  passthru = { gtk = gtk2; }; # probably its a good idea to use the same gtk in plugins ?
-
-  #configureFlags = [ "--disable-print" ];
-
-  enableParallelBuilding = true;
-
-  # "screenshot" needs this.
-  NIX_LDFLAGS = "-rpath ${xorg.libX11.out}/lib";
-
-  meta = {
-    description = "The GNU Image Manipulation Program";
-    homepage = https://www.gimp.org/;
-    license = stdenv.lib.licenses.gpl3Plus;
-    platforms = stdenv.lib.platforms.unix;
-  };
-}
diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix
new file mode 100644
index 000000000000..2536367f6ceb
--- /dev/null
+++ b/pkgs/applications/graphics/gimp/default.nix
@@ -0,0 +1,95 @@
+{ stdenv, fetchurl, fetchpatch, autoreconfHook, pkgconfig, intltool, babl, gegl, gtk2, glib, gdk_pixbuf, isocodes
+, pango, cairo, freetype, fontconfig, lcms, libpng, libjpeg, poppler, poppler_data, libtiff
+, libmng, librsvg, libwmf, zlib, libzip, ghostscript, aalib, shared-mime-info
+, python2Packages, libexif, gettext, xorg, glib-networking, libmypaint, gexiv2
+, harfbuzz, mypaint-brushes, libwebp, libgudev, openexr
+, AppKit, Cocoa, gtk-mac-integration }:
+
+let
+  inherit (python2Packages) pygtk wrapPython python;
+in stdenv.mkDerivation rec {
+  name = "gimp-${version}";
+  version = "2.10.0";
+
+  src = fetchurl {
+    url = "http://download.gimp.org/pub/gimp/v${stdenv.lib.versions.majorMinor version}/${name}.tar.bz2";
+    sha256 = "1qkxaigbfkx26xym5nzrgfrmn97cbnhn63v1saaha2nbi3xrdk3z";
+  };
+
+  patches = [
+    # fix rpath of python library https://bugzilla.gnome.org/show_bug.cgi?id=795620
+    (fetchurl {
+      url = https://bugzilla.gnome.org/attachment.cgi?id=371482;
+      sha256 = "18bysndh61pvlv255xapdrfpsl5ivm51wp1w7xgk9vky9z2y3llc";
+    })
+
+    # fix absolute paths stored in configuration
+    (fetchpatch {
+      url = https://git.gnome.org/browse/gimp/patch/?id=0fce8fdb3c056acead8322c976a96fb6fba793b6;
+      sha256 = "09845i3bdpdbf13razr04ksvwydxcvzhjwlb4dfgdv5q203g2ris";
+    })
+    (fetchpatch {
+      url = https://git.gnome.org/browse/gimp/patch/?id=f6b586237cb8c912c1503f8e6086edd17f07d4df;
+      sha256 = "0s68885ip2wgjvsl5vqi2f1xhxdjpzqprifzgdl1vnv6gqmfy3bh";
+    })
+
+    # fix pc file (needed e.g. for building plug-ins)
+    (fetchpatch {
+      url = https://git.gnome.org/browse/gimp/patch/?id=7e19906827d301eb70275dba089849a632a0eabe;
+      sha256 = "0cbjfbwvzg2hqihg3rpsga405v7z2qahj22dfqn2jrb2gbhrjcp1";
+    })
+  ];
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig intltool gettext wrapPython ];
+  propagatedBuildInputs = [ gegl ]; # needed by gimp-2.0.pc
+  buildInputs = [
+    babl gegl gtk2 glib gdk_pixbuf pango cairo gexiv2 harfbuzz isocodes libgudev
+    freetype fontconfig lcms libpng libjpeg poppler poppler_data libtiff openexr
+    libmng librsvg libwmf zlib libzip ghostscript aalib shared-mime-info libwebp
+    python pygtk libexif xorg.libXpm glib-networking libmypaint mypaint-brushes
+  ] ++ stdenv.lib.optionals stdenv.isDarwin [ AppKit Cocoa gtk-mac-integration ];
+
+  pythonPath = [ pygtk ];
+
+  # Check if librsvg was built with --disable-pixbuf-loader.
+  PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk_pixbuf.moduleDir}";
+
+  preConfigure = ''
+    # The check runs before glib-networking is registered
+    export GIO_EXTRA_MODULES="${glib-networking}/lib/gio/modules:$GIO_EXTRA_MODULES"
+  '';
+
+  postFixup = ''
+    wrapPythonProgramsIn $out/lib/gimp/${passthru.majorVersion}/plug-ins/
+    wrapProgram $out/bin/gimp-${stdenv.lib.versions.majorMinor version} \
+      --prefix PYTHONPATH : "$PYTHONPATH" \
+      --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
+  '';
+
+  passthru = rec {
+    # The declarations for `gimp-with-plugins` wrapper,
+    # used for determining plug-in installation paths
+    majorVersion = "${stdenv.lib.versions.major version}.0";
+    targetPluginDir = "lib/gimp/${majorVersion}/plug-ins";
+    targetScriptDir = "lib/gimp/${majorVersion}/scripts";
+
+    # probably its a good idea to use the same gtk in plugins ?
+    gtk = gtk2;
+  };
+
+  configureFlags = [
+    "--without-webkit" # old version is required
+  ];
+
+  doCheck = true;
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "The GNU Image Manipulation Program";
+    homepage = https://www.gimp.org/;
+    maintainers = with maintainers; [ jtojnar ];
+    license = licenses.gpl3Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix
index 0d4215dd5bc2..5b21b349764b 100644
--- a/pkgs/applications/graphics/gimp/plugins/default.nix
+++ b/pkgs/applications/graphics/gimp/plugins/default.nix
@@ -12,12 +12,12 @@ let
     prePhases = "extraLib";
     extraLib = ''
       installScripts(){
-        mkdir -p ${targetScriptDir};
-        for p in "$@"; do cp "$p" ${targetScriptDir}; done
+        mkdir -p $out/${targetScriptDir};
+        for p in "$@"; do cp "$p" $out/${targetScriptDir}; done
       }
       installPlugins(){
-        mkdir -p ${targetPluginDir};
-        for p in "$@"; do cp "$p" ${targetPluginDir}; done
+        mkdir -p $out/${targetPluginDir};
+        for p in "$@"; do cp "$p" $out/${targetPluginDir}; done
       }
     '';
   }
@@ -35,15 +35,6 @@ let
     installPhase = "installScripts ${src}";
   };
 
- libLQR = pluginDerivation {
-    name = "liblqr-1-0.4.1";
-    # required by lqrPlugin, you don't havet to install this lib explicitely
-    src = fetchurl {
-      url = http://registry.gimp.org/files/liblqr-1-0.4.1.tar.bz2;
-      sha256 = "02g90wag7xi5rjlmwq8h0qs666b1i2sa90s4303hmym40il33nlz";
-    };
-  };
-
 in
 rec {
   gap = pluginDerivation {
@@ -52,7 +43,7 @@ rec {
     */
     name = "gap-2.6.0";
     src = fetchurl {
-      url = http://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/gimp-gap-2.6.0.tar.bz2;
+      url = https://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/gimp-gap-2.6.0.tar.bz2;
       sha256 = "1jic7ixcmsn4kx2cn32nc5087rk6g8xsrz022xy11yfmgvhzb0ql";
     };
     patchPhase = ''
@@ -62,7 +53,7 @@ rec {
     hardeningDisable = [ "format" ];
     meta = with stdenv.lib; {
       description = "The GIMP Animation Package";
-      homepage = http://www.gimp.org;
+      homepage = https://www.gimp.org;
       # The main code is given in GPLv3, but it has ffmpeg in it, and I think ffmpeg license
       # falls inside "free".
       license = with licenses; [ gpl3 free ];
@@ -97,6 +88,7 @@ rec {
       url = "http://registry.gimp.org/files/${name}.tar.bz2";
       sha256 = "1gqf3hchz7n7v5kpqkhqh8kwnxbsvlb5cr2w2n7ngrvl56f5xs1h";
     };
+    meta.broken = true;
   };
 
   resynthesizer = pluginDerivation {
@@ -147,6 +139,7 @@ rec {
       sha256 = "1zzvbczly7k456c0y6s92a1i8ph4ywmbvdl8i4rcc29l4qd2z8fw";
     };
     installPhase = "installPlugins src/texturize";
+    meta.broken = true; # https://github.com/lmanul/gimp-texturize/issues/1
   };
 
   waveletSharpen = pluginDerivation {
@@ -166,54 +159,18 @@ rec {
        Layer/Liquid Rescale
     */
     name = "lqr-plugin-0.6.1";
-    buildInputs = with pkgs; [ libLQR ];
+    buildInputs = with pkgs; [ liblqr1 ];
     src = fetchurl {
       url = http://registry.gimp.org/files/gimp-lqr-plugin-0.6.1.tar.bz2;
       sha256 = "00hklkpcimcbpjly4rjhfipaw096cpy768g9wixglwrsyqhil7l9";
     };
-    #postInstall = ''mkdir -p $out/nix-support; echo "${libLQR}" > "$out/nix-support/propagated-user-env-packages"'';
+    #postInstall = ''mkdir -p $out/nix-support; echo "${liblqr1}" > "$out/nix-support/propagated-user-env-packages"'';
     installPhase = "installPlugins src/gimp-lqr-plugin";
   };
 
-  gmic =
-    pluginDerivation rec {
-      inherit (pkgs.gmic) name src meta;
+  gmic = pkgs.gmic.gimpPlugin;
 
-      buildInputs = with pkgs; [ fftw opencv curl ];
-
-      sourceRoot = "${name}/src";
-
-      buildFlags = "gimp";
-
-      installPhase = "installPlugins gmic_gimp";
-  };
-
-  # this is more than a gimp plugin !
-  # either load the raw image with gimp (and the import dialog will popup)
-  # or use the binary
-  ufraw = pluginDerivation rec {
-    name = "ufraw-0.19.2";
-    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.
-      # --enable-contrast - enable the contrast setting option.
-      # --enable-interp-none: enable 'None' interpolation (mostly for debugging).
-      # --with-lensfun: use the lensfun library - experimental feature, read this before using it.
-      # --with-prefix=PREFIX - use also PREFIX as an input prefix for the build
-      # --with-dosprefix=PREFIX - PREFIX in the the prefix in dos format (needed only for ms-window
-    configureFlags = "--enable-extras --enable-dst-correction --enable-contrast";
-
-    src = fetchurl {
-      url = "mirror://sourceforge/ufraw/${name}.tar.gz";
-      sha256 = "1lxba7pb3vcsq94dwapg9bk9mb3ww6r3pvvcyb0ah5gh2sgzxgkk";
-    };
-    installPhase = "
-      installPlugins ufraw-gimp
-      mkdir -p $out/bin
-      cp ufraw $out/bin
-    ";
-  };
+  ufraw = pkgs.ufraw.gimpPlugin;
 
   gimplensfun = pluginDerivation rec {
     version = "0.2.4";
@@ -239,7 +196,7 @@ rec {
 
       license = stdenv.lib.licenses.gpl3Plus;
       maintainers = [ ];
-      platforms = stdenv.lib.platforms.gnu;
+      platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;
     };
   };
 
diff --git a/pkgs/applications/graphics/gimp/wrapper.nix b/pkgs/applications/graphics/gimp/wrapper.nix
index 7455a69dde97..ec529519159b 100644
--- a/pkgs/applications/graphics/gimp/wrapper.nix
+++ b/pkgs/applications/graphics/gimp/wrapper.nix
@@ -1,9 +1,10 @@
 { stdenv, lib, symlinkJoin, gimp, makeWrapper, gimpPlugins, plugins ? null}:
 
 let
-allPlugins = lib.filter (pkg: builtins.isAttrs pkg && pkg.type == "derivation") (lib.attrValues gimpPlugins);
+allPlugins = lib.filter (pkg: builtins.isAttrs pkg && pkg.type == "derivation" && !pkg.meta.broken or false) (lib.attrValues gimpPlugins);
 selectedPlugins = if plugins == null then allPlugins else plugins;
 extraArgs = map (x: x.wrapArgs or "") selectedPlugins;
+versionBranch = stdenv.lib.versions.majorMinor gimp.version;
 
 in symlinkJoin {
   name = "gimp-with-plugins-${gimp.version}";
@@ -13,14 +14,14 @@ in symlinkJoin {
   buildInputs = [ makeWrapper ];
 
   postBuild = ''
-    for each in gimp-2.8 gimp-console-2.8; do
+    for each in gimp-${versionBranch} gimp-console-${versionBranch}; do
       wrapProgram $out/bin/$each \
         --set GIMP2_PLUGINDIR "$out/lib/gimp/2.0" \
         ${toString extraArgs}
     done
     set +x
     for each in gimp gimp-console; do
-      ln -sf "$each-2.8" $out/bin/$each
+      ln -sf "$each-${versionBranch}" $out/bin/$each
     done
   '';
 }
diff --git a/pkgs/applications/graphics/goxel/default.nix b/pkgs/applications/graphics/goxel/default.nix
index 8df630d582cc..3d49452cbe62 100644
--- a/pkgs/applications/graphics/goxel/default.nix
+++ b/pkgs/applications/graphics/goxel/default.nix
@@ -3,15 +3,17 @@
 
 stdenv.mkDerivation rec {
   name = "goxel-${version}";
-  version = "0.7.3";
+  version = "0.8.0";
 
   src = fetchFromGitHub {
     owner = "guillaumechereau";
     repo = "goxel";
     rev = "v${version}";
-    sha256 = "114s1pbv3ixc2gzkg7n927hffd6ly5gg59izw4z6drgjcdhd7xj9";
+    sha256 = "01022c43pmwiqb18rx9fz08xr99h6p03gw6bp0lay5z61g3xkz17";
   };
 
+  patches = [ ./disable-imgui_ini.patch ];
+
   nativeBuildInputs = [ scons pkgconfig wrapGAppsHook ];
   buildInputs = [ glfw3 gtk3 libpng12 ];
 
diff --git a/pkgs/applications/graphics/goxel/disable-imgui_ini.patch b/pkgs/applications/graphics/goxel/disable-imgui_ini.patch
new file mode 100644
index 000000000000..9427d45487d4
--- /dev/null
+++ b/pkgs/applications/graphics/goxel/disable-imgui_ini.patch
@@ -0,0 +1,13 @@
+diff --git a/src/gui.cpp b/src/gui.cpp
+index 9b7236c..a8a11b2 100644
+--- a/src/gui.cpp
++++ b/src/gui.cpp
+@@ -314,6 +314,8 @@ static void init_ImGui(const inputs_t *inputs)
+     ImGuiIO& io = ImGui::GetIO();
+     io.DeltaTime = 1.0f/60.0f;
+
++    io.IniFilename = NULL;
++
+     io.KeyMap[ImGuiKey_Tab]         = KEY_TAB;
+     io.KeyMap[ImGuiKey_LeftArrow]   = KEY_LEFT;
+     io.KeyMap[ImGuiKey_RightArrow]  = KEY_RIGHT;
diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix
index 47452eb43e88..5978612fdf33 100644
--- a/pkgs/applications/graphics/inkscape/default.nix
+++ b/pkgs/applications/graphics/inkscape/default.nix
@@ -2,9 +2,16 @@
 , libpng, zlib, popt, boehmgc, libxml2, libxslt, glib, gtkmm2
 , glibmm, libsigcxx, lcms, boost, gettext, makeWrapper
 , gsl, python2, poppler, imagemagick, libwpg, librevenge
-, libvisio, libcdr, libexif, potrace, cmake
+, libvisio, libcdr, libexif, potrace, autoreconfHook
+, intltool
+, icu # Not needed for building with CMake
+, lib
 }:
 
+# Note that originally this Nix expression used CMake to build but
+# this led to errors on MacOS of "Too many arguments". Inkscape
+# supports autoconf and we will use this for now on.
+
 let
   python2Env = python2.withPackages(ps: with ps; [ numpy lxml ]);
 in
@@ -17,41 +24,45 @@ stdenv.mkDerivation rec {
     sha256 = "1chng2yw8dsjxc9gf92aqv7plj11cav8ax321wmakmv5bb09cch6";
   };
 
-  unpackPhase = ''
-    cp $src ${name}.tar.bz2
-    tar xvjf ${name}.tar.bz2 > /dev/null
-    cd ${name}
-  '';
-
   postPatch = ''
     patchShebangs share/extensions
     patchShebangs fix-roff-punct
 
+    # XXX: Not needed for CMake:
+    ${lib.optionalString (!stdenv.isDarwin) ''
+      patchShebangs share/filters
+      patchShebangs share/palettes
+      patchShebangs share/patterns
+      patchShebangs share/symbols
+      patchShebangs share/templates
+    ''}
+
     # Python is used at run-time to execute scripts, e.g., those from
     # the "Effects" menu.
     substituteInPlace src/extension/implementation/script.cpp \
       --replace '"python-interpreter", "python"' '"python-interpreter", "${python2Env}/bin/python"'
   '';
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig autoreconfHook intltool ];
   buildInputs = [
     perl perlXMLParser libXft libpng zlib popt boehmgc
     libxml2 libxslt glib gtkmm2 glibmm libsigcxx lcms boost gettext
     makeWrapper gsl poppler imagemagick libwpg librevenge
-    libvisio libcdr libexif potrace cmake python2Env
+    libvisio libcdr libexif potrace python2Env icu
   ];
 
   enableParallelBuilding = true;
 
+  preConfigure = ''
+    intltoolize -f
+  '';
+
   postInstall = ''
     # Make sure PyXML modules can be found at run-time.
     rm "$out/share/icons/hicolor/icon-theme.cache"
-  '' + stdenv.lib.optionalString stdenv.isDarwin ''
-    install_name_tool -change $out/lib/libinkscape_base.dylib $out/lib/inkscape/libinkscape_base.dylib $out/bin/inkscape
-    install_name_tool -change $out/lib/libinkscape_base.dylib $out/lib/inkscape/libinkscape_base.dylib $out/bin/inkview
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     license = "GPL";
     homepage = https://www.inkscape.org;
     description = "Vector graphics editor";
@@ -62,5 +73,6 @@ stdenv.mkDerivation rec {
 
       If you want to import .eps files install ps2edit.
     '';
+    maintainers = with maintainers; [ matthewbauer ];
   };
 }
diff --git a/pkgs/applications/graphics/ocrad/default.nix b/pkgs/applications/graphics/ocrad/default.nix
index ac67759c258c..2ff62cc9eef2 100644
--- a/pkgs/applications/graphics/ocrad/default.nix
+++ b/pkgs/applications/graphics/ocrad/default.nix
@@ -29,6 +29,6 @@ stdenv.mkDerivation rec {
 
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ pSub ];
-    platforms = platforms.gnu;  # arbitrary choice
+    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/applications/graphics/openscad/default.nix b/pkgs/applications/graphics/openscad/default.nix
index 33fddf6c8d01..9ab5288700cc 100644
--- a/pkgs/applications/graphics/openscad/default.nix
+++ b/pkgs/applications/graphics/openscad/default.nix
@@ -1,20 +1,30 @@
-{ stdenv, fetchurl, qt4, qmake4Hook, bison, flex, eigen, boost, libGLU_combined, glew, opencsg, cgal
-, mpfr, gmp, glib, pkgconfig, harfbuzz, qscintilla, gettext
+{ stdenv, fetchurl, fetchFromGitHub, qt5, libsForQt5
+, bison, flex, eigen, boost, libGLU_combined, glew, opencsg, cgal
+, mpfr, gmp, glib, pkgconfig, harfbuzz, gettext
 }:
 
 stdenv.mkDerivation rec {
-  version = "2015.03-3";
+  version = "2018.04-git";
   name = "openscad-${version}";
 
-  src = fetchurl {
-    url = "http://files.openscad.org/${name}.src.tar.gz";
-    sha256 = "0djsgi9yx1nxr2gh1kgsqw5vrbncp8v5li0p1pp02higqf1psajx";
+#  src = fetchurl {
+#    url = "http://files.openscad.org/${name}.src.tar.gz";
+#    sha256 = "0djsgi9yx1nxr2gh1kgsqw5vrbncp8v5li0p1pp02higqf1psajx";
+#  };
+  src = fetchFromGitHub {
+    owner = "openscad";
+    repo = "openscad";
+    rev = "179074dff8c23cbc0e651ce8463737df0006f4ca";
+    sha256 = "1y63yqyd0v255liik4ff5ak6mj86d8d76w436x76hs5dk6jgpmfb";
   };
 
   buildInputs = [
-    qt4 qmake4Hook bison flex eigen boost libGLU_combined glew opencsg cgal mpfr gmp glib
-    pkgconfig harfbuzz qscintilla gettext
-  ];
+    bison flex eigen boost libGLU_combined glew opencsg cgal mpfr gmp glib
+    pkgconfig harfbuzz gettext
+  ]
+    ++ (with qt5; [qtbase qmake])
+    ++ (with libsForQt5; [qscintilla])
+  ;
 
   qmakeFlags = [ "VERSION=${version}" ];
 
diff --git a/pkgs/applications/graphics/panotools/default.nix b/pkgs/applications/graphics/panotools/default.nix
index 9ca90d2f5df3..719aca5096a5 100644
--- a/pkgs/applications/graphics/panotools/default.nix
+++ b/pkgs/applications/graphics/panotools/default.nix
@@ -18,6 +18,6 @@ stdenv.mkDerivation rec {
     description = "Free software suite for authoring and displaying virtual reality panoramas";
     license = stdenv.lib.licenses.gpl2Plus;
 
-    platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
+    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;  # arbitrary choice
   };
 }
diff --git a/pkgs/applications/graphics/pqiv/default.nix b/pkgs/applications/graphics/pqiv/default.nix
index 757ce52e9c4c..e4f565b3b052 100644
--- a/pkgs/applications/graphics/pqiv/default.nix
+++ b/pkgs/applications/graphics/pqiv/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation (rec {
   name = "pqiv-${version}";
-  version = "2.10.3";
+  version = "2.10.4";
 
   src = fetchFromGitHub {
     owner = "phillipberndt";
     repo = "pqiv";
     rev = version;
-    sha256 = "16nhnv0dcp242jf1099pjr5dwnc65i40cnb3dvx1avdhidcmsx01";
+    sha256 = "04fawc3sd625y1bbgfgwmak56pq28sm58dwn5db4h183iy3awdl9";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/applications/graphics/qtpfsgui/default.nix b/pkgs/applications/graphics/qtpfsgui/default.nix
index d3edc40cbea2..4be7d230b5f4 100644
--- a/pkgs/applications/graphics/qtpfsgui/default.nix
+++ b/pkgs/applications/graphics/qtpfsgui/default.nix
@@ -36,6 +36,6 @@ stdenv.mkDerivation rec {
     license = stdenv.lib.licenses.gpl2Plus;
 
     maintainers = [ ];
-    platforms = stdenv.lib.platforms.gnu;
+    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/graphics/sane/xsane.nix b/pkgs/applications/graphics/sane/xsane.nix
index ad02e1a80231..ca0f49e0c948 100644
--- a/pkgs/applications/graphics/sane/xsane.nix
+++ b/pkgs/applications/graphics/sane/xsane.nix
@@ -1,9 +1,9 @@
 { stdenv, fetchurl, sane-backends, sane-frontends, libX11, gtk2, pkgconfig, libpng
 , libusb ? null
-, gimpSupport ? false, gimp_2_8 ? null
+, gimpSupport ? false, gimp ? null
 }:
 
-assert gimpSupport -> gimp_2_8 != null;
+assert gimpSupport -> gimp != null;
 
 stdenv.mkDerivation rec {
   name = "xsane-0.999";
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [libpng sane-backends sane-frontends libX11 gtk2 ]
     ++ (if libusb != null then [libusb] else [])
-    ++ stdenv.lib.optional gimpSupport gimp_2_8;
+    ++ stdenv.lib.optional gimpSupport gimp;
 
   meta = {
     homepage = http://www.sane-project.org/;
diff --git a/pkgs/applications/graphics/scantailor/advanced.nix b/pkgs/applications/graphics/scantailor/advanced.nix
index bea4fe9b2c6c..1fb8d572e95b 100644
--- a/pkgs/applications/graphics/scantailor/advanced.nix
+++ b/pkgs/applications/graphics/scantailor/advanced.nix
@@ -44,6 +44,6 @@ stdenv.mkDerivation rec {
     description = "Interactive post-processing tool for scanned pages";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ jfrankenau ];
-    platforms = platforms.gnu;
+    platforms = platforms.gnu ++ platforms.linux;
   };
 }
diff --git a/pkgs/applications/graphics/scantailor/default.nix b/pkgs/applications/graphics/scantailor/default.nix
index ec7af8829073..395179ff70ae 100644
--- a/pkgs/applications/graphics/scantailor/default.nix
+++ b/pkgs/applications/graphics/scantailor/default.nix
@@ -19,6 +19,6 @@ stdenv.mkDerivation rec {
     license = stdenv.lib.licenses.gpl3Plus;
 
     maintainers = [ stdenv.lib.maintainers.viric ];
-    platforms = stdenv.lib.platforms.gnu;
+    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/graphics/shutter/default.nix b/pkgs/applications/graphics/shutter/default.nix
index 2cc127a3fc6f..3bc814e1e758 100644
--- a/pkgs/applications/graphics/shutter/default.nix
+++ b/pkgs/applications/graphics/shutter/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchurl, fetchpatch, perl, perlPackages, makeWrapper, imagemagick, gdk_pixbuf, librsvg }:
+{ stdenv, fetchurl, fetchpatch, perl, perlPackages, makeWrapper, imagemagick, gdk_pixbuf, librsvg
+, hicolor-icon-theme
+}:
 
 let
   perlModules = with perlPackages;
@@ -29,6 +31,7 @@ stdenv.mkDerivation rec {
     wrapProgram $out/bin/shutter \
       --set PERL5LIB "${stdenv.lib.makePerlPath perlModules}" \
       --prefix PATH : "${imagemagick.out}/bin" \
+      --suffix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
       --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
   '';
 
diff --git a/pkgs/applications/graphics/ufraw/default.nix b/pkgs/applications/graphics/ufraw/default.nix
index fc8e7a62c2ba..50cd9485a3e8 100644
--- a/pkgs/applications/graphics/ufraw/default.nix
+++ b/pkgs/applications/graphics/ufraw/default.nix
@@ -1,6 +1,9 @@
 { fetchurl, stdenv, pkgconfig, gtk2, gettext, bzip2, zlib
+, withGimpPlugin ? true, gimp ? null
 , libjpeg, libtiff, cfitsio, exiv2, lcms2, gtkimageview, lensfun }:
 
+assert withGimpPlugin -> gimp != null;
+
 stdenv.mkDerivation rec {
   name = "ufraw-0.22";
 
@@ -10,10 +13,23 @@ stdenv.mkDerivation rec {
     sha256 = "0pm216pg0vr44gwz9vcvq3fsf8r5iayljhf5nis2mnw7wn6d5azp";
   };
 
-  buildInputs =
-    [ pkgconfig gtk2 gtkimageview gettext bzip2 zlib
-      libjpeg libtiff cfitsio exiv2 lcms2 lensfun
-    ];
+  outputs = [ "out" ] ++ stdenv.lib.optional withGimpPlugin "gimpPlugin";
+
+  nativeBuildInputs = [ pkgconfig gettext ];
+  buildInputs = [
+    gtk2 gtkimageview bzip2 zlib
+    libjpeg libtiff cfitsio exiv2 lcms2 lensfun
+  ] ++ stdenv.lib.optional withGimpPlugin gimp;
+
+  configureFlags = [
+    "--enable-extras"
+    "--enable-dst-correction"
+    "--enable-contrast"
+  ] ++ stdenv.lib.optional withGimpPlugin "--with-gimp";
+
+  postInstall = stdenv.lib.optionalString withGimpPlugin ''
+    moveToOutput "lib/gimp" "$gimpPlugin"
+  '';
 
   meta = {
     homepage = http://ufraw.sourceforge.net/;
@@ -33,6 +49,6 @@ stdenv.mkDerivation rec {
     license = stdenv.lib.licenses.gpl2Plus;
 
     maintainers = [ ];
-    platforms = stdenv.lib.platforms.gnu;  # needs GTK+
+    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;  # needs GTK+
   };
 }
diff --git a/pkgs/applications/graphics/viewnior/default.nix b/pkgs/applications/graphics/viewnior/default.nix
index c655cadef400..5afd7a0237d0 100644
--- a/pkgs/applications/graphics/viewnior/default.nix
+++ b/pkgs/applications/graphics/viewnior/default.nix
@@ -38,6 +38,6 @@ stdenv.mkDerivation rec {
 
     maintainers = [ stdenv.lib.maintainers.smironov ];
 
-    platforms = stdenv.lib.platforms.gnu;
+    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/graphics/xfig/default.nix b/pkgs/applications/graphics/xfig/default.nix
index c70b1029b791..545675ab1545 100644
--- a/pkgs/applications/graphics/xfig/default.nix
+++ b/pkgs/applications/graphics/xfig/default.nix
@@ -42,6 +42,6 @@ stdenv.mkDerivation {
   meta = {
     description = "An interactive drawing tool for X11";
     homepage = http://xfig.org;
-    platforms = stdenv.lib.platforms.gnu;         # arbitrary choice
+    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;         # arbitrary choice
   };
 }