diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/graphics')
13 files changed, 85 insertions, 197 deletions
diff --git a/nixpkgs/pkgs/tools/graphics/asymptote/default.nix b/nixpkgs/pkgs/tools/graphics/asymptote/default.nix index 30681663a7ce..aeb51d66bf6f 100644 --- a/nixpkgs/pkgs/tools/graphics/asymptote/default.nix +++ b/nixpkgs/pkgs/tools/graphics/asymptote/default.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub -, autoreconfHook, bison, glm, flex, wrapQtAppsHook, cmake -, freeglut, ghostscriptX, imagemagick, fftw +{ lib, stdenv, fetchurl, fetchpatch +, autoreconfHook, bison, glm, flex, wrapQtAppsHook, cmake, pkg-config +, freeglut, ghostscriptX, imagemagick, fftw, eigen, libtirpc , boehmgc, libGLU, libGL, mesa, ncurses, readline, gsl, libsigsegv , python3, qtbase, qtsvg, boost , zlib, perl, curl @@ -9,16 +9,25 @@ }: stdenv.mkDerivation rec { - version = "2.87"; + version = "2.88"; pname = "asymptote"; - src = fetchFromGitHub { - owner = "vectorgraphics"; - repo = pname; - rev = version; - hash = "sha256-xzRZ7NOWeu+uC5WeTxwh5MFm7psXMhxrxucT4PVtRxM="; + outputs = [ "out" "man" "info" "doc" "tex" ]; + + src = fetchurl { + url = "mirror://sourceforge/asymptote/${version}/asymptote-${version}.src.tgz"; + hash = "sha256-DecadD+m7pORuH3Sdcs/5M3vUbN6rhSkFoNN0Soq9bs="; }; + patches = [ + (fetchpatch { + # partial fix for macOS XDR/V3D support (LDFLAGS change seems like an unrelated bugfix) + name = "restore-LDFLAGS-dont-look-for-tirpc-under-MacOS.patch"; + url = "https://github.com/vectorgraphics/asymptote/commit/7e17096b22d18d133d1bc5916b6e32c0cb24ad10.patch"; + hash = "sha256-olCFzqfZwWOAjqlB5lDPXYRHU9i3VQNgoR0cO5TmW98="; + }) + ]; + nativeBuildInputs = [ autoreconfHook bison @@ -27,15 +36,16 @@ stdenv.mkDerivation rec { texinfo wrapQtAppsHook cmake + pkg-config ]; buildInputs = [ - ghostscriptX imagemagick fftw + ghostscriptX imagemagick fftw eigen boehmgc ncurses readline gsl libsigsegv zlib perl curl qtbase qtsvg boost (texliveSmall.withPackages (ps: with ps; [ epsf cm-super ps.texinfo media9 ocgx2 collection-latexextra ])) (python3.withPackages (ps: with ps; [ cson numpy pyqt5 ])) - ]; + ] ++ lib.optionals stdenv.isLinux [ libtirpc ]; propagatedBuildInputs = [ glm @@ -47,14 +57,18 @@ stdenv.mkDerivation rec { dontWrapQtApps = true; + # Do not build $tex/ls-R which will be generated by texlive.combine preConfigure = '' HOME=$TMP + substituteInPlace Makefile.in \ + --replace-fail 'install: install-notexhash install-texhash' 'install: install-notexhash install-asy' + prependToVar configureFlags "--with-latex=$tex/tex/latex" "--with-context=$tex/tex/context/third" ''; - configureFlags = [ - "--with-latex=$out/share/texmf/tex/latex" - "--with-context=$out/share/texmf/tex/context/third" - ]; + # do not use bundled libgc.so + configureFlags = [ "--enable-gc=system" ] + # TODO add open_memstream to enable XDR/V3D on Darwin (requires memstream or >=10.13 Apple SDK) + ++ lib.optional stdenv.isDarwin "--enable-xdr=no"; env.NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc"; @@ -62,12 +76,11 @@ stdenv.mkDerivation rec { rm "$out"/bin/xasy makeQtWrapper "$out"/share/asymptote/GUI/xasy.py "$out"/bin/xasy --prefix PATH : "$out"/bin - mv $out/share/info/asymptote/*.info $out/share/info/ - sed -i -e 's|(asymptote/asymptote)|(asymptote)|' $out/share/info/asymptote.info - rmdir $out/share/info/asymptote - rm -f $out/share/info/dir + mv "$info"/share/info/asymptote/*.info "$info"/share/info/ + sed -i -e 's|(asymptote/asymptote)|(asymptote)|' "$info"/share/info/asymptote.info + rmdir "$info"/share/info/asymptote + rm -f "$info"/share/info/dir - rm -rf $out/share/texmf install -Dt $out/share/emacs/site-lisp/${pname} $out/share/asymptote/*.el ''; diff --git a/nixpkgs/pkgs/tools/graphics/gmic-qt/default.nix b/nixpkgs/pkgs/tools/graphics/gmic-qt/default.nix deleted file mode 100644 index a67479e4ffd5..000000000000 --- a/nixpkgs/pkgs/tools/graphics/gmic-qt/default.nix +++ /dev/null @@ -1,143 +0,0 @@ -{ lib -, stdenv -, fetchzip -, cimg -, cmake -, coreutils -, curl -, fftw -, gimp -, gimpPlugins -, gmic -, gnugrep -, gnused -, graphicsmagick -, libjpeg -, libpng -, libtiff -, ninja -, nix-update -, openexr -, pkg-config -, qtbase -, qttools -, wrapQtAppsHook -, writeShellScript -, zlib -, variant ? "standalone" -}: - -let - variants = { - gimp = { - extraDeps = [ - gimp - gimp.gtk - ]; - description = "GIMP plugin for the G'MIC image processing framework"; - }; - - standalone = { - description = "Versatile front-end to the image processing framework G'MIC"; - }; - }; - -in - -assert lib.assertMsg - (builtins.hasAttr variant variants) - "gmic-qt variant \"${variant}\" is not supported. Please use one of ${lib.concatStringsSep ", " (builtins.attrNames variants)}."; - -assert lib.assertMsg - (builtins.all (d: d != null) variants.${variant}.extraDeps or []) - "gmic-qt variant \"${variant}\" is missing one of its dependencies."; - -stdenv.mkDerivation (finalAttrs: { - pname = "gmic-qt${lib.optionalString (variant != "standalone") "-${variant}"}"; - version = "3.3.3"; - - src = fetchzip { - url = "https://gmic.eu/files/source/gmic_${finalAttrs.version}.tar.gz"; - hash = "sha256-LkWQ3fSHJSaXztX+soGZ+pl3MnXNgw6tV09356bAfYY="; - }; - - nativeBuildInputs = [ - cmake - pkg-config - ninja - wrapQtAppsHook - ]; - - buildInputs = [ - gmic - qtbase - qttools - fftw - zlib - libjpeg - libtiff - libpng - openexr - graphicsmagick - curl - ] ++ variants.${variant}.extraDeps or []; - - preConfigure = '' - cd gmic-qt - ''; - - postPatch = '' - patchShebangs \ - translations/filters/csv2ts.sh \ - translations/lrelease.sh - ''; - - cmakeFlags = [ - (lib.cmakeFeature "GMIC_QT_HOST" (if variant == "standalone" then "none" else variant)) - (lib.cmakeBool "ENABLE_SYSTEM_GMIC" true) - (lib.cmakeBool "ENABLE_DYNAMIC_LINKING" true) - ]; - - postFixup = lib.optionalString (variant == "gimp") '' - echo "wrapping $out/${gimp.targetPluginDir}/gmic_gimp_qt/gmic_gimp_qt" - wrapQtApp "$out/${gimp.targetPluginDir}/gmic_gimp_qt/gmic_gimp_qt" - ''; - - passthru = { - tests = { - gimp-plugin = gimpPlugins.gmic; - # Needs to update them all in lockstep. - inherit cimg gmic; - }; - - updateScript = writeShellScript "gmic-qt-update-script" '' - set -euo pipefail - - export PATH="${lib.makeBinPath [ coreutils curl gnugrep gnused nix-update ]}:$PATH" - - latestVersion=$(curl 'https://gmic.eu/files/source/' \ - | grep -E 'gmic_[^"]+\.tar\.gz' \ - | sed -E 's/.+<a href="gmic_([^"]+)\.tar\.gz".+/\1/g' \ - | sort --numeric-sort --reverse | head -n1) - - if [[ '${finalAttrs.version}' = "$latestVersion" ]]; then - echo "The new version same as the old version." - exit 0 - fi - - nix-update --version "$latestVersion" - ''; - }; - - meta = { - homepage = "http://gmic.eu/"; - inherit (variants.${variant}) description; - license = lib.licenses.gpl3Plus; - mainProgram = "gmic_qt"; - maintainers = [ - lib.maintainers.AndersonTorres - lib.maintainers.lilyinstarlight - ]; - platforms = lib.platforms.unix; - }; -}) diff --git a/nixpkgs/pkgs/tools/graphics/gromit-mpx/default.nix b/nixpkgs/pkgs/tools/graphics/gromit-mpx/default.nix index 0a54626419b5..7fdbe3b13f64 100644 --- a/nixpkgs/pkgs/tools/graphics/gromit-mpx/default.nix +++ b/nixpkgs/pkgs/tools/graphics/gromit-mpx/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { pname = "gromit-mpx"; - version = "1.5.1"; + version = "1.6.0"; src = fetchFromGitHub { owner = "bk138"; repo = "gromit-mpx"; rev = version; - sha256 = "sha256-6sjps0wbB0sTaQtehRmz2KBWxqk3pqJmQs9htqxmJwo="; + sha256 = "sha256-olDQGw0qDWwXpqRopVoEPDXLRpFiiBo+/jiVeL7R6QA="; }; nativeBuildInputs = [ cmake pkg-config wrapGAppsHook ]; diff --git a/nixpkgs/pkgs/tools/graphics/netpbm/default.nix b/nixpkgs/pkgs/tools/graphics/netpbm/default.nix index 14002fe65096..99aeb576939e 100644 --- a/nixpkgs/pkgs/tools/graphics/netpbm/default.nix +++ b/nixpkgs/pkgs/tools/graphics/netpbm/default.nix @@ -20,14 +20,14 @@ stdenv.mkDerivation { # Determine version and revision from: # https://sourceforge.net/p/netpbm/code/HEAD/log/?path=/advanced pname = "netpbm"; - version = "11.5.2"; + version = "11.5.3"; outputs = [ "bin" "out" "dev" ]; src = fetchsvn { url = "https://svn.code.sf.net/p/netpbm/code/advanced"; - rev = "4839"; - sha256 = "tK9HGERr8UejswZTW3NdXa7OGpzqDTCegGQVaB4RK+I="; + rev = "4867"; + sha256 = "JCJW6BBdxoYWMpZoJp6ovHNqyuU4a1FIvjLB2poDGGM="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/tools/graphics/pngcrush/default.nix b/nixpkgs/pkgs/tools/graphics/pngcrush/default.nix index 8ce9965eae25..2863881b9302 100644 --- a/nixpkgs/pkgs/tools/graphics/pngcrush/default.nix +++ b/nixpkgs/pkgs/tools/graphics/pngcrush/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, libpng }: +{ lib, stdenv, fetchurl, fetchpatch2, libpng }: stdenv.mkDerivation rec { pname = "pngcrush"; @@ -9,6 +9,13 @@ stdenv.mkDerivation rec { sha256 = "0l43c59d6v9l0g07z3q3ywhb8xb3vz74llv3mna0izk9bj6aqkiv"; }; + patches = [ + (fetchpatch2 { + url = "https://salsa.debian.org/debian/pngcrush/-/raw/b4856b56fbc28252103cc14d156baddd564ca880/debian/patches/ignore_PNG_IGNORE_ADLER32.patch"; + hash = "sha256-pFON/NUJiXMe9GETptgNltWa0izlby6P/fLsG1abz3g="; + }) + ]; + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc" ]; # gcc and/or clang compat configurePhase = '' diff --git a/nixpkgs/pkgs/tools/graphics/quirc/0001-dont-build-demos.patch b/nixpkgs/pkgs/tools/graphics/quirc/0001-dont-build-demos.patch index 9ecb6dda4e19..5e11a5207508 100644 --- a/nixpkgs/pkgs/tools/graphics/quirc/0001-dont-build-demos.patch +++ b/nixpkgs/pkgs/tools/graphics/quirc/0001-dont-build-demos.patch @@ -4,8 +4,8 @@ index 2d5b745..ecef988 100644 +++ b/Makefile @@ -37,7 +37,7 @@ DEMO_UTIL_OBJ = \ - OPENCV_CFLAGS != pkg-config --cflags opencv4 - OPENCV_LIBS != pkg-config --libs opencv4 + OPENCV_CFLAGS := $(shell pkg-config --cflags opencv4 2>&1) + OPENCV_LIBS = $(shell pkg-config --libs opencv4) -QUIRC_CXXFLAGS = $(QUIRC_CFLAGS) $(OPENCV_CFLAGS) --std=c++17 +QUIRC_CXXFLAGS = $(QUIRC_CFLAGS) --std=c++17 diff --git a/nixpkgs/pkgs/tools/graphics/quirc/default.nix b/nixpkgs/pkgs/tools/graphics/quirc/default.nix index 88993dbe8ce6..aa6c0cfeb671 100644 --- a/nixpkgs/pkgs/tools/graphics/quirc/default.nix +++ b/nixpkgs/pkgs/tools/graphics/quirc/default.nix @@ -1,17 +1,24 @@ { lib, stdenv, fetchFromGitHub, SDL_gfx, SDL, libjpeg, libpng, opencv , pkg-config }: -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "quirc"; - version = "2021-10-08"; + version = "1.2"; src = fetchFromGitHub { owner = "dlbeer"; repo = "quirc"; - rev = "516d91a94d880ca1006fc1d57f318bdff8411f0d"; - sha256 = "0jkaz5frm6jr9bxyfympvzh180nczrfvvb3z3qhk21djlas6nr5f"; + rev = "v${finalAttrs.version}"; + hash = "sha256-zdq/YKL33jJXa10RqmQIl06rRYnrthWG+umT4dipft0="; }; + postPatch = '' + # don't try to change ownership + substituteInPlace Makefile \ + --replace-fail "-o root" "" \ + --replace-fail "-g root" "" + ''; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ SDL SDL_gfx libjpeg libpng opencv ]; @@ -28,15 +35,6 @@ stdenv.mkDerivation { runHook postBuild ''; - configurePhase = '' - runHook preConfigure - - # don't try to change ownership - sed -e 's/-[og] root//g' -i Makefile - - runHook postConfigure - ''; - preInstall = '' mkdir -p "$out"/{bin,lib,include} @@ -44,10 +42,17 @@ stdenv.mkDerivation { find -maxdepth 1 -type f -executable ! -name '*.so.*' | xargs cp -t "$out"/bin ''; + postInstall = '' + # don't install static library + rm $out/lib/libquirc.a + + ln -s $out/lib/libquirc.so.* $out/lib/libquirc.so + ''; + meta = { description = "A small QR code decoding library"; license = lib.licenses.isc; maintainers = [ lib.maintainers.raskin ]; platforms = lib.platforms.linux ++ [ "x86_64-darwin" "aarch64-darwin" ]; }; -} +}) diff --git a/nixpkgs/pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch b/nixpkgs/pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch index faeb65d3b847..19453e8912a9 100644 --- a/nixpkgs/pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch +++ b/nixpkgs/pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch @@ -1,13 +1,15 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1e7b71a..9db85b1 100644 +index 1e7b71a..e743ab0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -107,6 +107,8 @@ if(USE_SYSTEM_NCNN) +@@ -106,9 +106,9 @@ if(USE_SYSTEM_NCNN) + message(STATUS "Using glslang install located at ${GLSLANG_TARGET_DIR}") find_package(Threads) ++ find_package(SPIRV-Tools-opt REQUIRED) -+ include("${GLSLANG_TARGET_DIR}/SPIRV-Tools/SPIRV-ToolsTarget.cmake") -+ include("${GLSLANG_TARGET_DIR}/SPIRV-Tools-opt/SPIRV-Tools-optTargets.cmake") include("${GLSLANG_TARGET_DIR}/OSDependentTargets.cmake") - include("${GLSLANG_TARGET_DIR}/OGLCompilerTargets.cmake") +- include("${GLSLANG_TARGET_DIR}/OGLCompilerTargets.cmake") if(EXISTS "${GLSLANG_TARGET_DIR}/HLSLTargets.cmake") + # hlsl support can be optional + include("${GLSLANG_TARGET_DIR}/HLSLTargets.cmake") diff --git a/nixpkgs/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix b/nixpkgs/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix index 6a3b66a3548c..c7f9817326b8 100644 --- a/nixpkgs/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix +++ b/nixpkgs/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix @@ -50,15 +50,20 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin $out/share + cp realesrgan-ncnn-vulkan $out/bin/ cp -r ${models}/models $out/share ''; + postFixup = '' + patchelf $out/bin/realesrgan-ncnn-vulkan --add-needed libvulkan.so + ''; + meta = with lib; { description = "NCNN implementation of Real-ESRGAN. Real-ESRGAN aims at developing Practical Algorithms for General Image Restoration"; homepage = "https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan"; license = licenses.mit; - maintainers = with maintainers; [ tilcreator ]; + maintainers = with maintainers; [ tilcreator iynaix ]; platforms = platforms.all; mainProgram = "realesrgan-ncnn-vulkan"; }; diff --git a/nixpkgs/pkgs/tools/graphics/rocket/default.nix b/nixpkgs/pkgs/tools/graphics/rocket/default.nix index 070e359fe1c5..5dcd40b4d5ec 100644 --- a/nixpkgs/pkgs/tools/graphics/rocket/default.nix +++ b/nixpkgs/pkgs/tools/graphics/rocket/default.nix @@ -23,6 +23,7 @@ mkDerivation { meta = with lib; { description = "A tool for synchronizing music and visuals in demoscene productions"; + mainProgram = "editor"; homepage = "https://github.com/rocket/rocket"; license = licenses.zlib; platforms = platforms.linux; diff --git a/nixpkgs/pkgs/tools/graphics/snapdragon-profiler/default.nix b/nixpkgs/pkgs/tools/graphics/snapdragon-profiler/default.nix index caf187cb4c1f..aa8477d5717d 100644 --- a/nixpkgs/pkgs/tools/graphics/snapdragon-profiler/default.nix +++ b/nixpkgs/pkgs/tools/graphics/snapdragon-profiler/default.nix @@ -10,7 +10,6 @@ , gtk-sharp-2_0 , gtk2 , libcxx -, libcxxabi , coreutils , requireFile , archive ? requireFile { @@ -42,7 +41,6 @@ stdenv.mkDerivation rec { gtk-sharp-2_0 gtk2 libcxx - libcxxabi ]; installPhase = '' diff --git a/nixpkgs/pkgs/tools/graphics/vips/default.nix b/nixpkgs/pkgs/tools/graphics/vips/default.nix index 5c59971f955c..fde14fe0c53d 100644 --- a/nixpkgs/pkgs/tools/graphics/vips/default.nix +++ b/nixpkgs/pkgs/tools/graphics/vips/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "vips"; - version = "8.15.1"; + version = "8.15.2"; outputs = [ "bin" "out" "man" "dev" ] ++ lib.optionals (!stdenv.isDarwin) [ "devdoc" ]; @@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "libvips"; repo = "libvips"; rev = "refs/tags/v${finalAttrs.version}"; - hash = "sha256-0zfYpOawH7XnTH9k8BdNDtZEKpYUlCXp7GY+fdXalsE="; + hash = "sha256-jp6RPceFzzWgFBzcfvggniAkhXaAGszT/sy4H6aCtGc="; # Remove unicode file names which leads to different checksums on HFS+ # vs. other filesystems because of unicode normalisation. postFetch = '' diff --git a/nixpkgs/pkgs/tools/graphics/vulkan-caps-viewer/default.nix b/nixpkgs/pkgs/tools/graphics/vulkan-caps-viewer/default.nix index f5962d9aa6c4..4ab820b512e3 100644 --- a/nixpkgs/pkgs/tools/graphics/vulkan-caps-viewer/default.nix +++ b/nixpkgs/pkgs/tools/graphics/vulkan-caps-viewer/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "vulkan-caps-viewer"; - version = "3.33"; + version = "3.34"; src = fetchFromGitHub { owner = "SaschaWillems"; repo = "VulkanCapsViewer"; rev = version; - hash = "sha256-eKUgsT3KDua+whO0JdtnniKqoRmBt58LELeUz24goPM="; + hash = "sha256-F1D/+Q/GXqQazTNgwdiHS9qqIHy0YGssmagw615E+xg="; # Note: this derivation strictly requires vulkan-header to be the same it was developed against. # To help us, they've put it in a git-submodule. # The result will work with any vulkan-loader version. |