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/draftsight/default.nix4
-rw-r--r--pkgs/applications/graphics/exrdisplay/default.nix10
-rw-r--r--pkgs/applications/graphics/ktikz/default.nix5
-rw-r--r--pkgs/applications/graphics/processing3/default.nix12
-rw-r--r--pkgs/applications/graphics/renderdoc/custom_swig.patch32
-rw-r--r--pkgs/applications/graphics/renderdoc/default.nix62
-rw-r--r--pkgs/applications/graphics/scantailor/advanced.nix29
8 files changed, 49 insertions, 109 deletions
diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix
index d8c11f33439a..63cf950f02a4 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.8-2";
-    sha256 = "06cpvvv8xikw5jm1pa2xxxlnsy743ham67yshpndn2x3fyf48267";
+    version = "7.0.8-6";
+    sha256 = "1v7m1g9a7fqc8nravvv3dy54nzd3ip75hcnkdrpb5wbiz9pqgzi3";
     patches = [];
   };
 in
diff --git a/pkgs/applications/graphics/draftsight/default.nix b/pkgs/applications/graphics/draftsight/default.nix
index d817424c4525..30101bb94770 100644
--- a/pkgs/applications/graphics/draftsight/default.nix
+++ b/pkgs/applications/graphics/draftsight/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, dpkg, makeWrapper, gcc, libGLU_combined, xdg_utils,
-  dbus_tools, alsaLib, cups, fontconfig, glib, icu, libpng12,
+  dbus, alsaLib, cups, fontconfig, glib, icu, libpng12,
   xkeyboard_config, zlib, libxslt, libxml2, sqlite, orc,
   libX11, libXcursor, libXrandr, libxcb, libXi, libSM, libICE,
   libXrender, libXcomposite }:
@@ -71,7 +71,7 @@ stdenv.mkDerivation {
   };
 
   libPath = stdenv.lib.makeLibraryPath [ gcc.cc libGLU_combined xdg_utils
-    dbus_tools alsaLib cups.lib fontconfig glib icu libpng12
+    dbus alsaLib cups.lib fontconfig glib icu libpng12
     xkeyboard_config zlib libxslt libxml2 sqlite orc libX11
     libXcursor libXrandr libxcb libXi libSM libICE libXrender
     libXcomposite ];
diff --git a/pkgs/applications/graphics/exrdisplay/default.nix b/pkgs/applications/graphics/exrdisplay/default.nix
index e698fb8f2341..562fb8c11dc3 100644
--- a/pkgs/applications/graphics/exrdisplay/default.nix
+++ b/pkgs/applications/graphics/exrdisplay/default.nix
@@ -1,6 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, fltk, openexr, libGLU_combined, openexr_ctl }:
-
-assert fltk.glSupport;
+{ stdenv, fetchurl, pkgconfig, fltk, openexr, libGLU_combined, ctl }:
 
 stdenv.mkDerivation {
   name ="openexr_viewers-2.2.1";
@@ -14,14 +12,14 @@ stdenv.mkDerivation {
     ./configure --prefix=$out --with-fltk-config=${fltk}/bin/fltk-config
   '';
 
-  buildPahse = ''
+  buildPhase = ''
     make LDFLAGS="`fltk-config --ldflags` -lGL -lfltk_gl"
   '';
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ openexr fltk libGLU_combined openexr_ctl ];
+  buildInputs = [ openexr fltk libGLU_combined ctl ];
 
-  meta = { 
+  meta = {
     description = "Application for viewing OpenEXR images on a display at various exposure settings";
     homepage = http://openexr.com;
     platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/applications/graphics/ktikz/default.nix b/pkgs/applications/graphics/ktikz/default.nix
index 8817071e9843..4b3a423a8ce2 100644
--- a/pkgs/applications/graphics/ktikz/default.nix
+++ b/pkgs/applications/graphics/ktikz/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, gettext, poppler_qt5, qt5 , pkgconfig }:
+{ stdenv, fetchFromGitHub, gettext, poppler, qt5 , pkgconfig }:
 
 # Warning: You will also need a working pdflatex installation containing
 # at least auctex and pgf.
@@ -64,8 +64,7 @@ stdenv.mkDerivation rec {
   '';
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ gettext qt5.full poppler_qt5 ];
+  buildInputs = [ gettext qt5.full poppler ];
 
   enableParallelBuilding = true;
 }
-
diff --git a/pkgs/applications/graphics/processing3/default.nix b/pkgs/applications/graphics/processing3/default.nix
index 4ef078fdbac6..803257d93929 100644
--- a/pkgs/applications/graphics/processing3/default.nix
+++ b/pkgs/applications/graphics/processing3/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, callPackage, fetchFromGitHub, makeWrapper, ant, jdk, rsync, javaPackages, libXxf86vm }:
+{ stdenv, callPackage, fetchFromGitHub, fetchurl, xmlstarlet, makeWrapper, ant, jdk, rsync, javaPackages, libXxf86vm, gsettings-desktop-schemas }:
 
 stdenv.mkDerivation rec {
   version = "3.3.7";
@@ -19,6 +19,14 @@ stdenv.mkDerivation rec {
     rm core/library/*.jar
     cp ${javaPackages.jogl_2_3_2}/share/java/*.jar core/library/
 
+    # do not download a file during build
+    ${xmlstarlet}/bin/xmlstarlet ed --inplace -P -d '//get[@src="http://download.processing.org/reference.zip"]' build/build.xml
+    install -D -m0444 ${fetchurl {
+                          url    = http://download.processing.org/reference.zip;
+                          sha256 = "104zig026y8vbl4qksmscjq0bms8mi2jmri1ijdlbkxcqnv9bnlf";
+                        }
+                       } ./java/reference.zip
+
     # suppress "Not fond of this Java VM" message box
     substituteInPlace app/src/processing/app/platform/LinuxPlatform.java \
       --replace 'Messages.showWarning' 'if (false) Messages.showWarning'
@@ -37,9 +45,11 @@ stdenv.mkDerivation rec {
     ln -s ${jdk} $out/${name}/java
 
     makeWrapper $out/${name}/processing      $out/bin/processing \
+        --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name} \
         --prefix _JAVA_OPTIONS " " -Dawt.useSystemAAFontSettings=lcd \
         --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
     makeWrapper $out/${name}/processing-java $out/bin/processing-java \
+        --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name} \
         --prefix _JAVA_OPTIONS " " -Dawt.useSystemAAFontSettings=lcd \
         --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
   '';
diff --git a/pkgs/applications/graphics/renderdoc/custom_swig.patch b/pkgs/applications/graphics/renderdoc/custom_swig.patch
deleted file mode 100644
index e6ed05ea97a5..000000000000
--- a/pkgs/applications/graphics/renderdoc/custom_swig.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git a/qrenderdoc/CMakeLists.txt b/qrenderdoc/CMakeLists.txt
-index 2df9ffa5..66bafaba 100644
---- a/qrenderdoc/CMakeLists.txt
-+++ b/qrenderdoc/CMakeLists.txt
-@@ -65,16 +65,6 @@ include(ExternalProject)
- # Need bison for swig
- find_package(BISON)
- 
--# Compile our custom SWIG that will do scoped/strong enum classes
--ExternalProject_Add(custom_swig
--    # using an URL to a zip directly so we don't clone the history etc
--    URL ${RENDERDOC_SWIG_PACKAGE}
--    BUILD_IN_SOURCE 1
--    CONFIGURE_COMMAND ./autogen.sh > /dev/null 2>&1
--    COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ./configure --with-pcre=yes --prefix=${CMAKE_BINARY_DIR} > /dev/null
--    BUILD_COMMAND $(MAKE) > /dev/null 2>&1
--    INSTALL_COMMAND $(MAKE) install > /dev/null 2>&1)
--
- # Lastly find PySide 2, optionally, for Qt5 Python bindings
- list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
- 
-@@ -186,9 +176,8 @@ foreach(in ${swig_interfaces})
-     get_filename_component(swig_file ${in} NAME_WE)
- 
-     add_custom_command(OUTPUT ${swig_file}_python.cxx ${swig_file}.py
--            COMMAND ${CMAKE_BINARY_DIR}/bin/swig -v -Wextra -Werror -O -c++ -python -modern -modernargs -enumclass -fastunpack -py3 -builtin -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_SOURCE_DIR}/renderdoc/api/replay -outdir ${CMAKE_CURRENT_BINARY_DIR} -o ${CMAKE_CURRENT_BINARY_DIR}/${swig_file}_python.cxx ${CMAKE_CURRENT_SOURCE_DIR}/${in}
-+	    COMMAND $ENV{NIXOS_CUSTOM_SWIG} -v -Wextra -Werror -O -c++ -python -modern -modernargs -enumclass -fastunpack -py3 -builtin -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_SOURCE_DIR}/renderdoc/api/replay -outdir ${CMAKE_CURRENT_BINARY_DIR} -o ${CMAKE_CURRENT_BINARY_DIR}/${swig_file}_python.cxx ${CMAKE_CURRENT_SOURCE_DIR}/${in}
-             DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${in}
--            DEPENDS custom_swig
-             DEPENDS ${RDOC_REPLAY_FILES}
-             DEPENDS ${QRD_INTERFACE_FILES})
- 
diff --git a/pkgs/applications/graphics/renderdoc/default.nix b/pkgs/applications/graphics/renderdoc/default.nix
index 2bd3ab89161f..9a21d457a83f 100644
--- a/pkgs/applications/graphics/renderdoc/default.nix
+++ b/pkgs/applications/graphics/renderdoc/default.nix
@@ -1,74 +1,62 @@
 { stdenv, fetchFromGitHub, cmake, pkgconfig
-, qtbase, qtx11extras, qtsvg, makeWrapper, python3, bison
-, pcre, vulkan-loader, xorg, autoreconfHook
+, qtbase, qtx11extras, qtsvg, makeWrapper
+, vulkan-loader, xorg
+, python36, bison, pcre, automake, autoconf
 }:
-
 let
-  custom_swig = stdenv.mkDerivation {
-    name = "renderdoc-custom-swig";
-    src = fetchFromGitHub {
-      owner = "baldurk";
-      repo = "swig";
-      rev = "renderdoc-modified-1";
-      sha256 = "1whymd3vamwnp4jqfc9asls3dw9wsdi21xhm1d2a4vx9nql8if1x";
-    };
-
-    nativeBuildInputs = [ autoreconfHook pcre ];
-
-    autoreconfPhase = ''
-      patchShebangs autogen.sh
-      ./autogen.sh
-    '';
+  custom_swig = fetchFromGitHub {
+    owner = "baldurk";
+    repo = "swig";
+    rev = "renderdoc-modified-5";
+    sha256 = "0ihrxbx56p5wn589fbbsns93fp91sypqdzfxdy7l7v9sf69a41mw";
   };
 in
 stdenv.mkDerivation rec {
+  version = "1.0";
   name = "renderdoc-${version}";
-  version = "0.91";
 
   src = fetchFromGitHub {
     owner = "baldurk";
     repo = "renderdoc";
-    rev = "2d8b2cf818746b6a2add54e2fef449398816a40c";
-    sha256 = "07yc3fk7j2nqmrhc4dm3v2pgbc37scd7d28nlzk6v0hw99zck8k0";
+    rev = "v${version}";
+    sha256 = "0l7pjxfrly4llryjnwk42dzx65n78wc98h56qm4yh04ja8fdbx2y";
   };
 
   buildInputs = [
-    qtbase qtsvg xorg.libpthreadstubs xorg.libXdmcp qtx11extras vulkan-loader
+    qtbase qtsvg xorg.libpthreadstubs xorg.libXdmcp qtx11extras vulkan-loader python36
   ];
 
-  nativeBuildInputs = [ cmake makeWrapper pkgconfig python3 bison ];
+  nativeBuildInputs = [ cmake makeWrapper pkgconfig bison pcre automake autoconf ];
+
+  postUnpack = ''
+    cp -r ${custom_swig} swig
+    chmod -R +w swig
+    patchShebangs swig/autogen.sh
+  '';
 
   cmakeFlags = [
     "-DBUILD_VERSION_HASH=${src.rev}"
     "-DBUILD_VERSION_DIST_NAME=NixOS"
-    "-DBUILD_VERSION_DIST_VER=0.91"
+    "-DBUILD_VERSION_DIST_VER=${version}"
     "-DBUILD_VERSION_DIST_CONTACT=https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/graphics/renderdoc"
-    "-DBUILD_VERSION_DIST_STABLE=ON"
-    # TODO: use this instead of preConfigure once placeholders land
-    #"-DVULKAN_LAYER_FOLDER=${placeholder out}/share/vulkan/implicit_layer.d/"
+    "-DBUILD_VERSION_STABLE=ON"
+    # TODO: add once pyside2 is in nixpkgs
+    #"-DPYSIDE2_PACKAGE_DIR=${python36Packages.pyside2}"
   ];
 
+  # Future work: define these in the above array via placeholders
   preConfigure = ''
     cmakeFlags+=" -DVULKAN_LAYER_FOLDER=$out/share/vulkan/implicit_layer.d/"
+    cmakeFlags+=" -DRENDERDOC_SWIG_PACKAGE=$PWD/../swig"
   '';
 
   preFixup = ''
-    mkdir $out/bin/.bin
-    mv $out/bin/qrenderdoc $out/bin/.bin/qrenderdoc
-    ln -s $out/bin/.bin/qrenderdoc $out/bin/qrenderdoc
     wrapProgram $out/bin/qrenderdoc --suffix LD_LIBRARY_PATH : $out/lib --suffix LD_LIBRARY_PATH : ${vulkan-loader}/lib
-    mv $out/bin/renderdoccmd $out/bin/.bin/renderdoccmd
-    ln -s $out/bin/.bin/renderdoccmd $out/bin/renderdoccmd
     wrapProgram $out/bin/renderdoccmd --suffix LD_LIBRARY_PATH : $out/lib --suffix LD_LIBRARY_PATH : ${vulkan-loader}/lib
   '';
 
-  # Set path to custom swig binary
-  NIXOS_CUSTOM_SWIG = "${custom_swig}/bin/swig";
-
   enableParallelBuilding = true;
 
-  patches = [ ./custom_swig.patch ];
-
   meta = with stdenv.lib; {
     description = "A single-frame graphics debugger";
     homepage = https://renderdoc.org/;
diff --git a/pkgs/applications/graphics/scantailor/advanced.nix b/pkgs/applications/graphics/scantailor/advanced.nix
index 82a498968728..29e53683d1c2 100644
--- a/pkgs/applications/graphics/scantailor/advanced.nix
+++ b/pkgs/applications/graphics/scantailor/advanced.nix
@@ -4,46 +4,23 @@
 
 stdenv.mkDerivation rec {
   name = "scantailor-advanced-${version}";
-  version = "1.0.15";
+  version = "1.0.16";
 
   src = fetchFromGitHub {
     owner = "4lex4";
     repo = "scantailor-advanced";
     rev = "v${version}";
-    sha256 = "031jqk64ig6lmscl5yg5lp116zwn0jl7xs9rlniqf6a8g4wfbjk9";
+    sha256 = "0lc9lzbpiy5hgimyhl4s4q67pb9gacpy985gl6iy8pl79zxhmcyp";
   };
 
   nativeBuildInputs = [ cmake qttools ];
   buildInputs = [ libjpeg libpng libtiff boost qtbase ];
 
-  postInstall = ''
-    mkdir -p $out/share/icons/hicolor/scalable/apps
-    cp $src/resources/appicon.svg $out/share/icons/hicolor/scalable/apps/scantailor.svg
-
-    mkdir -p $out/share/applications
-    cp $desktopItem/share/applications/* $out/share/applications/
-    for entry in $out/share/applications/*.desktop; do
-      substituteAllInPlace $entry
-    done
-  '';
-
-  desktopItem = makeDesktopItem {
-    name = "scantailor-advanced";
-    exec = "scantailor %f";
-    icon = "scantailor";
-    comment = meta.description;
-    desktopName = "Scan Tailor Advanced";
-    genericName = "Scan Processing Software";
-    mimeType = "image/png;image/tif;image/jpeg;";
-    categories = "Graphics;";
-    startupNotify = "true";
-  };
-
   meta = with stdenv.lib; {
     homepage = https://github.com/4lex4/scantailor-advanced;
     description = "Interactive post-processing tool for scanned pages";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ jfrankenau ];
-    platforms = platforms.gnu ++ platforms.linux;
+    platforms = with platforms; gnu ++ linux ++ darwin;
   };
 }